From java-user-return-40049-apmail-lucene-java-user-archive=lucene.apache.org@lucene.apache.org Fri May 01 04:19:06 2009 Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 50022 invoked from network); 1 May 2009 04:19:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 May 2009 04:19:06 -0000 Received: (qmail 53787 invoked by uid 500); 1 May 2009 04:19:03 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 53726 invoked by uid 500); 1 May 2009 04:19:02 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 53716 invoked by uid 99); 1 May 2009 04:19:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 04:19:02 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of anshumg@gmail.com designates 209.85.221.127 as permitted sender) Received: from [209.85.221.127] (HELO mail-qy0-f127.google.com) (209.85.221.127) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 04:18:55 +0000 Received: by qyk33 with SMTP id 33so2780415qyk.29 for ; Thu, 30 Apr 2009 21:18:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=pmlRg5lGMSeVSOXvXX78D2T4Hmcwhqg6R9XuOFO4BXo=; b=cfHvewa0Zr9FVbdPNB84Ho8A8fddyB7b8JbNd6DWJltuciW6iuT0RfiBRmo9Agtdwq ppCldfdJuZ4psN95rBYFrFA/pQ6es0Vd8rPe1jkj8WfREY1jTIN1uNV0Tlxc0NMKBj4H p8/uOlZIIiCZrANLLtUoiY+BK+IeNhSHJReOg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=oC1qPz60+Mpw3N25J+bsrlN0afv1Hh2pz56QH2HRRLLFYscvuMtywdw3HuIQ7w56GF hWzU3uOAsN5XYruKuOUIdeUY3liLr4YoMz+a9nkfuzphLr6/USjrgMpejQOnoLPu1fhF FU1YG1L4d6UneouD4EiSGxv/xgq8GQ/GN/ERw= MIME-Version: 1.0 Received: by 10.229.85.132 with SMTP id o4mr1952182qcl.0.1241151515039; Thu, 30 Apr 2009 21:18:35 -0700 (PDT) In-Reply-To: References: Date: Fri, 1 May 2009 09:48:34 +0530 Message-ID: <867513fe0904302118i723481f2r76e315a7cb766c72@mail.gmail.com> Subject: Re: [ no subject ] From: Anshum To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=0016364edc322a9b9f0468d21bcf X-Virus-Checked: Checked by ClamAV on apache.org --0016364edc322a9b9f0468d21bcf Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit As per my knowledge, you'd have to index one of the docs and then run a query (second doc) to get the similarity score. Also, the default similarity would take into account more factors than the regular VSM hence, you'd even have to look into it. 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 to me. The distinction is yours to draw............ On Thu, Apr 30, 2009 at 8:58 PM, Kamal Najib wrote: > 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 there > any other way to do it? > for esample: getTheSymilarity(Vector1,Vector2). > Thanks in advance. > kamal. > > -- > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > --0016364edc322a9b9f0468d21bcf--