Re: A simple Vector Space Model and TFIDF usage

2009-07-02 Thread Kamal Najib
Hallo Amir, So far i understand, you have two sets of documents, let we say set1 and set2. If you want to get the Similarity between the two sets documents you have to index the docs of one and schearch each doc of the others as a query, then you can get the similarity of the two documents. So:

Re: RE: how to get the word before and the word after the matched Term?

2009-05-19 Thread Kamal Najib
ed against. You could simply retrieve this string, and then use simple java String manipulation to get what you want. Matt Kamal Najib wrote: > Hi all, > I want to get the word before and the word after the matched Term.For Example if i have the Text " The drug was freshly prepare

Re: Re: how to get the word before and the word after the matched Term?

2009-05-18 Thread Kamal Najib
Kamal Najib wrote: > Hi all, > I want to get the word before and the word after the matched Term.For Example if i have the Text " The drug was freshly prepared at 4-hour intervals . Eleven courses were administered to seven patients at this dose level and no patient experience

how to get the word before and the word after the matche d Term?

2009-05-18 Thread Kamal Najib
Hi all, I want to get the word before and the word after the matched Term.For Example if i have the Text " The drug was freshly prepared at 4-hour intervals . Eleven courses were administered to seven patients at this dose level and no patient experienced nausea or vomiting" and the matched Te

Re: Re: how to do stemming?

2009-05-11 Thread Kamal Najib
Thank you Ian. Kamal Original Message: Yep, I reckon so. btw a Google search for something like lucene stemming gets hits, including a couple of articles about stemming. Might be worth a look. -- Ian. On Mon, May 11, 2009 at 2:08 PM, Kamal Najib wrote: > will the anlyzer now do stemming,

Re: Re: I can't found the package org.apache.luc ene.index.memory.AnalyzerUtil

2009-05-11 Thread Kamal Najib
Thank you. kamal. Original Message: The class is contained in org.apache.lucene.index.memory.AnalyzerUtil Assuming you've installed 2.4, it's in... which is located in the contrib area. Try looking in /contrib/memory/lucene-memory-2.4.0.jar Best Erick 2009/5/11 Kamal Najib >

how to do stemming?

2009-05-11 Thread Kamal Najib
will the anlyzer now do stemming, if i do the folow: analyzer = new StandardAnalyzer(); analyzer=AnalyzerUtil.getPorterStemmerAnalyzer(analyzer); thanks. Kamal. -- -- - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apa

[ no subject ]

2009-05-11 Thread Kamal Najib
will the anlyzer now do stemming, if i do the folow: analyzer = new StandardAnalyzer(); analyzer=AnalyzerUtil.getPorterStemmerAnalyzer(analyzer); thanks. Kamal. -- - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.or

thanks, i have got it!(the package :org.apache.l ucene.index.memory.AnalyzerUtil)

2009-05-11 Thread Kamal Najib
I have found it. thanks. Kamal. -- - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org

I can't found the package org.apache.lucene.index .memory.AnalyzerUtil

2009-05-11 Thread Kamal Najib
Hi all, can someone tell me where can i find the package org.apache.lucene.index.memory.AnalyzerUtil in the lucene api?I can't found it. many thanks. Kamal. -- - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.or

Re: Re: I got the score "0.3044460713 863373" for the cosine similarity of two do cument with the same text content !!

2009-05-08 Thread Kamal Najib
Thank you for the Replay, i have got it. Kamal. Original Message: What does the searcher.explain() method say? -Grant On May 6, 2009, at 2:18 AM, Kamal Najib wrote: > hi, > thanks for the reply.see: http://lucene.apache.org/java/2_4_1/api/index.html > you will find there the Simila

Re: Re: I got the score "0.3044460713863373 " for the cosine similarity of two document with the same text content !!

2009-05-06 Thread Kamal Najib
d with vascular",analyzer,"term",null); ScoreDoc[] scoreDocs = searcher.search(query,5).scoreDocs; I got the score mentioned above.(0.3044460713863373) thanks. kamal Original Message: What is SimilarityQueries? I'd try the explain capabilities to see more. On May 5, 2009, at 2

I got the score "0.3044460713863373" for the cosine similarity of two document with the same text content !!

2009-05-05 Thread Kamal Najib
hi all, i got the similarity score 0.3044460713863373 between two docs which have the same text content, is it correct? I expected 1.0, hier is my result line: doc:"this expression of galectin-1 in blood vessel walls was correlated with vascular" doc2 :"this expression of galectin-1 in blood v

get the cosine similarity between two docs

2009-05-04 Thread Kamal Najib
Hi all, I try to get the cosine similarity between two docs: I have tried first to create a document for a String like this: Document doc1=new Document(); doc1.add(new Field("term","nodular lesions over years responding kamal najib nodular lesions over years responding&q

Re: Re: I cann't find the package org.apache.luc ene.search.similar

2009-05-04 Thread Kamal Najib
Thanks Mike, i have found it. Kamal. Original Message: This is in the contrib-queries JAR. Mike On Mon, May 4, 2009 at 6:02 AM, Kamal Najib wrote: > Hi all, > I try to use the class MoreLikeThis on the package org.apache.lucene.search.similar but i cann't be resolved in eclipse

I cann't find the package org.apache.lucene.search .similar

2009-05-04 Thread Kamal Najib
Hi all, I try to use the class MoreLikeThis on the package org.apache.lucene.search.similar but i cann't be resolved in eclipse.I imported the lucene-core-2.4.1.jar and lucene-demos-2.4.1.jar.any suggestion? thanks in advance. Kamal. -- -

Re: not the length that matters, but the content

2009-05-02 Thread Kamal Najib
I think one way to realize it is to run a phrase query.In your example for example: if you run phrasequery with " the quick brown fox" you will only have maches like "*"+"the quickbrown fox"+"*",the * is any other string. that's mean a doc will be considered as a match only if the doc contans

Re: Re: How to get the similarity between two string v ectors?

2009-05-01 Thread Kamal Najib
MemoryIndex which contains one document and represent the other document as a query and the "search". But, no, there isn't a MethodName(Vector1, Vector2) option. -Grant On Apr 30, 2009, at 1:00 PM, Kamal Najib wrote: > Hi, > I am new to Lucene and I want to get the s

Re: Re: [ no subject ]

2009-05-01 Thread Kamal Najib
You may write code that on the fly creates a volatile index, runs a query, returns the similarity and clears the index (which would happen implicitly in case of a ramdir approach. -- Anshum Gupta Naukri Labs! http://ai-cafe.blogspot.com The facts expressed here belong to everybody, the opinions t

How to get the similarity between two string vectors?

2009-04-30 Thread Kamal Najib
Hi, I am new to Lucene and I want to get the similarity between two vectors of strings,is there a method, who do that? for example if i have the vectors: Vector1 :<"term1","term2","term3"> Vector2:<"term4","term5","term5"> is there a method to get the similarity between them in lucene,or is there

[ no subject ]

2009-04-30 Thread Kamal Najib
Hi, A am new in Lucene and I want to get the similarity between two vectors of strings,is there a method, who do that? for example assume the vectors: Vector1 :<"term1","term2","term3"> Vector2:<"term4","term5","term5"> is there a method to get the similarity between them in lucene,or is ther