12

Is there a PHP library for processing strings and correcting grammar? I'm creating an application where the users are consistently inputting data without capitalizing letters etc.

Is there a library for processing this kind of thing, or am I better off just making it so that the first letter after every full stop is a capital and calling it a day?

Anonymous
  • 6,181
  • 7
  • 45
  • 72
  • do you want the first letter of each sentence capital –  Jun 11 '12 at 11:02
  • 1
    Possible duplicate of http://stackoverflow.com/questions/1162220/open-source-grammar-checker – Rupesh Pawar Jun 11 '12 at 11:05
  • Do you want to display the errors to the user - eg highlight issues or are you wanting to 'sliently' correct the issues server side? – Bruce Jun 11 '12 at 11:18
  • @Rupesh Pawar No its not a duplicate question. – Bruce Jun 11 '12 at 11:19
  • @Bruce - Apologies, I should have been more clear. Just silently make minor corrections that we assume will be correct in 99% of circumstances - things like capital letters after full stops or at the start of a paragraph/first sentence, spell correction that is applied only when the checker can be certain that it's correction is.. correct. If that makes sense. Silent grammatical/spell check that isn't too 'abrasive'. I'm probably asking too much, I might end up putting something together myself. – Anonymous Jun 11 '12 at 12:11

2 Answers2

2

Hope this will help anyone who walks in here..

grammark php is one of the PHP library to check grammar

benomatis
  • 5,536
  • 7
  • 36
  • 59
Yellow and Red
  • 695
  • 9
  • 31
-3

http://www.languagetool.org/

http://www.afterthedeadline.com/

Raab
  • 34,778
  • 4
  • 50
  • 65
  • Not really what the OP was asking as these are NOT PHP libraries. – Bruce Jun 11 '12 at 11:16
  • Languagetool is an opensource library and can easily be used for this purpose – Raab Jun 11 '12 at 11:18
  • 7
    Rather than just linking to the tools - it would be useful if you could expand your answer to demostrate how the OP would integrate Languagetool into his set up. – Bruce Jun 11 '12 at 11:21