Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 31404 invoked from network); 6 Jul 2007 17:24:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Jul 2007 17:24:19 -0000 Received: (qmail 21052 invoked by uid 500); 6 Jul 2007 17:24:16 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 20887 invoked by uid 500); 6 Jul 2007 17:24:15 -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 20876 invoked by uid 99); 6 Jul 2007 17:24:15 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jul 2007 10:24:15 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [169.229.70.150] (HELO rescomp.berkeley.edu) (169.229.70.150) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jul 2007 10:24:10 -0700 Received: by rescomp.berkeley.edu (Postfix, from userid 1007) id 9A27F5B780; Fri, 6 Jul 2007 10:23:49 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by rescomp.berkeley.edu (Postfix) with ESMTP id 7E6567F403 for ; Fri, 6 Jul 2007 10:23:49 -0700 (PDT) Date: Fri, 6 Jul 2007 10:23:49 -0700 (PDT) From: Chris Hostetter To: java-user@lucene.apache.org Subject: Re: Retrieve nearest token based off location in original Text In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org : I never got a response to this and thought maybe I was too wordy. : : I'm wondering if there's a way where given a position in the original text : you can retrieve the token index that is nearest to that position using the : StandardToken/StandardTokenizer classes? i may not be understanding the question, but wouldn't that just be... TokenStream s = getTokenStreamForOrriginalText() Token t; for (i=0; i