[newbie] LanguageTool client

Just starting out? Need help? Post your questions and find answers here.
joahim
New User
New User
Posts: 5
Joined: Thu Nov 11, 2010 3:28 pm
Contact:

[newbie] LanguageTool client

Post 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
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: [newbie] LanguageTool client

Post 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.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
infratec
Always Here
Always Here
Posts: 7662
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: [newbie] LanguageTool client

Post 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
Post Reply