ctakes-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maite Meseure Hugues <meseure.ma...@gmail.com>
Subject Re: Creating my own dictionaries
Date Fri, 06 Mar 2015 14:17:44 GMT
Thank you for your reply. Indeed I had to change the java build path but I
also had errors due to Lucene version that is deprecated:

the constructors 'new IndexWriter(directory, analyzer,
true,IndexWriter.MaxFieldLength.LIMITED);' and 'iwriter.optimize();' do not
exist in version 4 anymore.

So, in CreateLuceneIndexFromDelimitedFile.java, I changed:

1)Line 89: Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_30);

by -->  Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_40);

2)Line 98: iwriter = new IndexWriter(directory, analyzer,
true,IndexWriter.MaxFieldLength.LIMITED);

by --> IndexWriterConfig conf = new IndexWriterConfig(Version.LUCENE_40,
analyzer);

      iwriter = new IndexWriter(directory, conf);

3)Line 159: iwriter.optimize();

by --> nothing or TieredMergePolicy.setUseComoundFile(boolean) but I am not
certain.

Does anyone know more about this problem?

Thank you.


sources below:
https://lucene.apache.org/core/4_0_0/core/org/apache/lucene/index/IndexWriter.html

http://lucene.472066.n3.nabble.com/IndexWriter-optimize-is-removed-in-4-0-td4035769.html

http://stackoverflow.com/questions/14599297/lucene-migration-from-3-x-to-4-1-0-and-index-optimisation

On Tue, Mar 3, 2015 at 4:22 PM, HARPREET KHANDUJA (RIT Student) <
hsk5004@rit.edu> wrote:

> I am not sure but not setting the classpath to the project could be the
> problem.
>
>
> On Tue, Mar 3, 2015 at 5:07 PM, Maite Meseure Hugues <
> meseure.maite@gmail.com> wrote:
>
> > Hi everyone,
> >
> > I am currently facing a problem to run The
> > CreateLuceneIndexFromDelimitedFile class that allows to get a Lucene
> index
> > and reads from a pipe-delimited file. the error message is:
> >
> > Could not find or load main class
> >
> >
> org.apache.ctakes.dictionary.lookup.tools.CreateLuceneIndexFromDelimitedFile
> >
> > (same thing for
> >
> >
> scripts/java/edu/mayo/bmi/dictionarytools/CreateLuceneIndexForExampleDrugs.java
> >
> >
> >
> scripts/java/edu/mayo/bmi/dictionarytools/CreateLuceneIndexForSnomedLikeSample.java
> > )
> > Does someone know what is the problem?
> > Thank you for your time.
> > --
> > --
> >  Maïté Meseure Hugues
> >
>



-- 
--
 Maïté Meseure Hugues

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message