fbpx
Skip to main content
  1. franciov
  2. Ingegneria Informatica - Specialistica
  3. Domenica, 11 Dicembre 2005
  4.  Subscribe via email
Innauguro il Topic.
Postate qui problemi, soluzioni....

Io ora mi sto studiando il funzionamento di LUCENE e di WORDNET.
Pensavo di fare il progetto 2.III
Comment
There are no comments made yet.
Accepted Answer Pending Moderation
Ciao!! Tanto per cominciare male...non riesco a far partire neanche le demo di lucene....
Cosa intende per {index-dir} nel comando "java........demo.IndexHTML -create -index {index-dir}? La directory che voglio indicizzare? Ossia la sotto directory di webapps di Tomcat? Oppure non sto capendo nulla? Inoltre devo creare io .../opt/lucene/index?
Grazie
Comment
There are no comments made yet.
Accepted Answer Pending Moderation
Ciao!! Tanto per cominciare male...non riesco a far partire neanche le demo di lucene....
Cosa intende per {index-dir} nel comando "java........demo.IndexHTML -create -index {index-dir}? La directory che voglio indicizzare? Ossia la sotto directory di webapps di Tomcat? Oppure non sto capendo nulla? Inoltre devo creare io .../opt/lucene/index?
Grazie

Direttamente da Lucene in Action (Manning, 2005):
A.3 Running the web application demo
The web demo is slightly involved to set up and run properly. You need a web container; our instructions are for Tomcat 5. The docs/demo.html documentation provides detailed instructions for setting up and running the web application, but you can also follow the steps provided here.
The index used by the web application differs slightly from that in the command-line demo. First, it restricts itself to indexing only .html, .htm, and .txt files. Each file it processes (including .txt files) is parsed using a custom rudimentary HTML parser. To build the index initially, execute IndexHTML:
[code type="markup"]java -cp lucene-1.4.2.jar;lucene-demos-1.4.2.jar
org.apache.lucene.demo.IndexHTML -create -index webindex docs
.
.
.
adding docs/resources.html
adding docs/systemproperties.html
adding docs/whoweare.html
Optimizing index...
7220 total milliseconds[/code]
The -index webindex switch sets the location of the index directory. In a moment, you’ll need the full path to this directory to configure the web application. The final docs argument to IndexHTML is the directory tree to index. The –create switch creates an index from scratch. Remove this switch to update the index with files that have been added or changed since the last time the index was built.

Quindi {index-dir} è la directory dove vuoi che venga scritto l'indice (composto da un insieme di file). Poi devi specificare anche quello che vuoi indicizzare.

Invece se vuoi usare IndexFiles, la sintassi è questa:
[code type="markup"]java -cp lucene-1.4.2.jar;lucene-demos-1.4.2.jar
org.apache.lucene.demo.IndexFiles docs[/code]
Comment
There are no comments made yet.
Accepted Answer Pending Moderation
Grazie!!!
Comment
There are no comments made yet.
Accepted Answer Pending Moderation
Ragazzi, mi appresto ad implementare un parser per il corpus cranfield, dato che Lucene non supporta direttamente il formato in cui i documenti si trovano nel file cran.all. Avete qualche dritta su qualche parser noto(già implementato), perchè le mie ricerche sono state vane.... :cry: :lol: :roll:
Qualcuno ha agito diversamente per indicizzare il file cran.all su Lucene?

Grazie in anticipo!! :P
Comment
There are no comments made yet.
Accepted Answer Pending Moderation
Qualcuno ha agito diversamente per indicizzare il file cran.all su Lucene?

Io ho creato un mio parser.
Non è difficile.
Ci vuole solo molta pazienza... :shock:
Comment
There are no comments made yet.
Accepted Answer Pending Moderation
Qualcuno ha agito diversamente per indicizzare il file cran.all su Lucene?

Io ho creato un mio parser.
Non è difficile.
Ci vuole solo molta pazienza... :shock:


Grazie per la risp Franciov...
Un'altra domanda...sto incontrando difficoltà nell'uso dell'analyzer.Mi spiego: seguendo le istruzioni di "Lucene in action" istanzio un oggetto IndexWriter passando un oggetto analyzer...fin qui tutto ok...compilo e non mi da nessun errore...al momento di passare il file mi da un errore NoClassDefErr o qualcosa del genere...secondo voi a che cosa è imputabile(assumendo che nn abbia commesso errori GROSSOLANI di programmazione)?Sto usando il jdk 1.5...

GRAZIE!
Comment
There are no comments made yet.
Accepted Answer Pending Moderation
Quando esegui il prog prova a mettere prima il classpath e poi la classe da eseguire....

java -cp bla bla bla;. ClasseJava
Comment
There are no comments made yet.
Accepted Answer Pending Moderation
Posso sapere per favore se qualcuno ha già utilizzato Lucene per fare ricerche sul web?
Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!