Page 1 of 1

[newbie] LanguageTool client

Posted: Fri May 18, 2012 9:36 pm
by joahim
Dear PB Users,

I'd like to create a PB application that would use a LanguageTool - application for checking grammar and punctuation rules.

LanguageTool works as a server - when you send for example:

http://localhost:8081/?language=xx&text=my+text

you receive a XML response:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<matches>
<error fromy="0" fromx="0" toy="0" tox="5"
  ruleId="UPPERCASE_SENTENCE_START"
  msg="This sentence does not start with an uppercase letter"
  replacements="This" context="this is a test."
  contextoffset="0"
  errorlength="4"/>
</matches>
What kind of connection should I create?
Which command should I use to send a message to this kind of HTTP server and receive the response?

Best regards,

joahim

Re: [newbie] LanguageTool client

Posted: Sun May 20, 2012 8:29 pm
by IdeasVacuum
Sounds like that would mean your app could only deliver grammar and punctuation if your User was online? That seems an unnecessary restriction, I think your potential customers may choose a rival that did not have that issue.

Re: [newbie] LanguageTool client

Posted: Mon May 21, 2012 7:02 am
by infratec
Hi Joahim,

you can use SendNetworkString() and ReceiveNetworkData()
look here
http://www.purebasic.fr/english/viewtop ... 12&t=44954
to get an idea.

Bernd