Is there a possibility to spell check on content displayed in web page with selenium webdriver. or can you suggest any API for the same. Regards, Eliyas
Asked
Active
Viewed 5,089 times
3
-
Please provide more details about the scenario. – Rupesh Shinde Mar 30 '15 at 15:09
1 Answers
5
Try the Google API for spell checking. Solution is for java - https://code.google.com/p/google-api-spelling-java/
(Below content is from the link)
Sample code:
SpellChecker checker = new SpellChecker();
SpellResponse spellResponse = checker.check( "helloo worlrd" );
for( SpellCorrection sc : spellResponse.getCorrections() )
System.out.println( sc.getValue() );
This will print all the corrections available for the text "helloo worlrd".
It is also possible to set more options to the request,
// Proxy settings
Configuration config = new Configuration();
config.setProxy( "my_proxy_host", 8080, "http" );
SpellChecker checker = new SpellChecker( config );
checker.setOverHttps( true ); // Use https (default true from v1.1)
checker.setLanguage( Language.ENGLISH ); // Use English (default)
SpellRequest request = new SpellRequest();
request.setText( "helloo helloo worlrd" );
request.setIgnoreDuplicates( true ); // Ignore duplicates
SpellResponse spellResponse = checker.check( request );
for( SpellCorrection sc : spellResponse.getCorrections() )
System.out.println( sc.getValue() );
Update: Found some more spell checkers:
- JSpell - https://www.jspell.com/java-spell-checker.html
- JOrtho (free) - http://jortho.sourceforge.net/
- Jazzy (free) - http://sourceforge.net/projects/jazzy/

LittlePanda
- 2,496
- 1
- 21
- 33
-
-
1I saw a few questions discussing spell checkers for C# -http://stackoverflow.com/questions/16141985/what-is-good-for-spell-checker-google-spell-checker-or-hunspell, http://stackoverflow.com/questions/12439204/google-spell-checker-api. – LittlePanda Mar 30 '15 at 16:43