Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Homework3

Misused Homophone Correction

Approach used:

Based on natural language parsing to work out the grammatical structure of sentences. Used the PCFG (Probabilistic Context Free Grammar) to produce the most likely grammatical structure of new sentences.

Used Stanford NLP parser (JAVA) licensed under the GNU General Public License (v2 or later) for generating the parse tree for the sentences. Given a sentence, identify the presence of the one/any of the misused homophones: it's vs its to vs too lose vs loose they're vs their you're vs your

If a sentence contains any homophone from the above list , new sentences are generated by replacing the homophone with the word it is confused with. Each of the newly generated sentences is parsed using the Stanford NLP parser and the tree obtained is assigned a score. The tree with the higher score is the most likely grammatical structure for the sentence and hence this sentence is chosen as the corrected sentence.

Steps to compile: 1.javac -classpath ${CLASSPATH} ErrorCorrection.java CLASSPATH should include the jar files stanford-parser.jar and stanford-parser-3.5.1-models.jar Steps to execute 2. java -classpath .;${CLASSPATH} ErrorCorrection inputfilename outputfilename

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages