I am using Lucene 4.10 and would like to know how wordnet can be used to
expand an input query for this version of Lucene. the program fragment is as
follows:
*File file = new File("model/wn_s.pl");
InputStream stream = new FileInputStream(file);
Reader rulesReader = new InputStreamReader(stream); 
SynonymMap.Builder parser = null;
parser = new WordnetSynonymParser(true, true, new ClassicAnalyzer());
((WordnetSynonymParser) parser).parse(rulesReader);         
SynonymMap synonymMap = parser.build();*
the following exception will be produced when running the program
*java.text.ParseException:Invalid synonym rule line 109.*
I have searched much materials in google, but i have not resolve this
exception.  I want to know how to use the WordNetSynonymParser, Can you
paste a sample code for me? thank you.




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Using-wordnet-synonyms-to-expand-a-query-in-Lucene-4-10-version-tp4167712.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to