Searched defs:offsetAtt (Results 1 - 25 of 62) sorted by relevance

123

/lucene-3.6.0/solr/core/src/java/org/apache/solr/analysis/
H A DTrimFilter.java36 private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); field in class:TrimFilter
73 if (updateOffsets && len == offsetAtt.endOffset() - offsetAtt.startOffset()) {
74 int newStart = offsetAtt.startOffset()+start;
75 int newEnd = offsetAtt.endOffset() - (start<end ? endOff:0);
76 offsetAtt.setOffset(newStart, newEnd);
H A DPatternTokenizer.java60 private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); field in class:PatternTokenizer
91 offsetAtt.setOffset(correctOffset(index), correctOffset(matcher.end(group)));
105 offsetAtt.setOffset(correctOffset(index), correctOffset(matcher.start()));
119 offsetAtt.setOffset(correctOffset(index), correctOffset(str.length()));
128 offsetAtt.setOffset(ofs, ofs);
H A DBufferedTokenStream.java77 private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); field in class:BufferedTokenStream
155 token.setOffset(offsetAtt.startOffset(), offsetAtt.endOffset());
168 offsetAtt.setOffset(token.startOffset(), token.endOffset());
/lucene-3.6.0/lucene/contrib/analyzers/common/src/java/org/apache/lucene/analysis/payloads/
H A DTokenOffsetPayloadTokenFilter.java36 private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); field in class:TokenOffsetPayloadTokenFilter
47 PayloadHelper.encodeInt(offsetAtt.startOffset(), data, 0);
48 PayloadHelper.encodeInt(offsetAtt.endOffset(), data, 4);
/lucene-3.6.0/lucene/test-framework/src/java/org/apache/lucene/analysis/
H A DCannedTokenStream.java35 private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); field in class:CannedTokenStream
52 offsetAtt.setOffset(token.startOffset(), token.endOffset());
H A DTokenStreamToDot.java35 private final OffsetAttribute offsetAtt; field in class:TokenStreamToDot
50 offsetAtt = in.addAttribute(OffsetAttribute.class);
52 offsetAtt = null;
92 if (offsetAtt != null) {
93 final int startOffset = offsetAtt.startOffset();
94 final int endOffset = offsetAtt.endOffset();
/lucene-3.6.0/lucene/contrib/highlighter/src/java/org/apache/lucene/search/highlight/
H A DSimpleFragmenter.java31 private OffsetAttribute offsetAtt; field in class:SimpleFragmenter
50 offsetAtt = stream.addAttribute(OffsetAttribute.class);
59 boolean isNewFrag = offsetAtt.endOffset() >= (fragmentSize * currentNumFrags);
H A DSimpleSpanFragmenter.java43 private OffsetAttribute offsetAtt; field in class:SimpleSpanFragmenter
86 boolean isNewFrag = offsetAtt.endOffset() >= (fragmentSize * currentNumFrags)
87 && (textSize - offsetAtt.endOffset()) >= (fragmentSize >>> 1);
106 offsetAtt = tokenStream.addAttribute(OffsetAttribute.class);
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/analysis/
H A DKeywordTokenizer.java37 private OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); field in class:KeywordTokenizer
74 offsetAtt.setOffset(correctOffset(0), finalOffset);
83 offsetAtt.setOffset(finalOffset, finalOffset);
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/index/
H A DTestSameTokenSamePosition.java65 private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); field in class:BugReproTokenStream
78 offsetAtt.setOffset(starts[nextTokenIndex], ends[nextTokenIndex]);
/lucene-3.6.0/lucene/contrib/analyzers/phonetic/src/java/org/apache/lucene/analysis/phonetic/
H A DBeiderMorseFilter.java63 private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); field in class:BeiderMorseFilter
91 offsetAtt.setOffset(startOffset, endOffset);
99 startOffset = offsetAtt.startOffset();
100 endOffset = offsetAtt.endOffset();
/lucene-3.6.0/lucene/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/
H A DWordTokenFilter.java44 private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); field in class:WordTokenFilter
66 tokStart = offsetAtt.startOffset();
67 tokEnd = offsetAtt.endOffset();
72 tokenBuffer = wordSegmenter.segmentSentence(termAtt.toString(), offsetAtt.startOffset());
90 offsetAtt.setOffset(tokStart, tokEnd);
92 offsetAtt.setOffset(nextWord.startOffset, nextWord.endOffset);
H A DSentenceTokenizer.java48 private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); field in class:SentenceTokenizer
107 offsetAtt.setOffset(correctOffset(tokenStart), correctOffset(tokenEnd));
129 offsetAtt.setOffset(finalOffset, finalOffset);
/lucene-3.6.0/solr/core/src/test/org/apache/solr/analysis/
H A DTestTrimFilter.java94 OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); field in class:TestTrimFilter.IterTokenStream
117 offsetAtt.setOffset(token.startOffset(), token.endOffset());
/lucene-3.6.0/lucene/contrib/icu/src/java/org/apache/lucene/analysis/icu/segmentation/
H A DICUTokenizer.java49 /** accumulated offset of previous buffers for this reader, for offsetAtt */
54 private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); field in class:ICUTokenizer
114 offsetAtt.setOffset(correctOffset(finalOffset), correctOffset(finalOffset));
208 offsetAtt.setOffset(correctOffset(offset + start), correctOffset(offset + end));
/lucene-3.6.0/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/
H A DTestMultiAnalyzerQPHelper.java172 private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); field in class:TestMultiAnalyzerQPHelper.TestFilter
183 offsetAtt.setOffset(prevStartOffset, prevEndOffset);
194 prevStartOffset = offsetAtt.startOffset();
195 prevEndOffset = offsetAtt.endOffset();
H A DTestMultiAnalyzerWrapper.java166 private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); field in class:TestMultiAnalyzerWrapper.TestFilter
177 offsetAtt.setOffset(prevStartOffset, prevEndOffset);
188 prevStartOffset = offsetAtt.startOffset();
189 prevEndOffset = offsetAtt.endOffset();
/lucene-3.6.0/lucene/backwards/src/test/org/apache/lucene/index/
H A DTestSameTokenSamePosition.java78 private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); field in class:BugReproAnalyzerTokenizer
91 offsetAtt.setOffset(starts[nextTokenIndex], ends[nextTokenIndex]);
/lucene-3.6.0/lucene/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cn/
H A DChineseTokenizer.java86 private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); field in class:ChineseTokenizer
101 offsetAtt.setOffset(correctOffset(start), correctOffset(start+length));
162 this.offsetAtt.setOffset(finalOffset, finalOffset);
/lucene-3.6.0/lucene/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ngram/
H A DNGramTokenFilter.java45 private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); field in class:NGramTokenFilter
85 tokStart = offsetAtt.startOffset();
86 tokEnd = offsetAtt.endOffset();
97 offsetAtt.setOffset(tokStart, tokEnd);
99 offsetAtt.setOffset(tokStart + curPos, tokStart + curPos + curGramSize);
H A DNGramTokenizer.java44 private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); field in class:NGramTokenizer
150 offsetAtt.setOffset(correctOffset(oldPos), correctOffset(oldPos+gramSize));
158 this.offsetAtt.setOffset(finalOffset, finalOffset);
/lucene-3.6.0/lucene/contrib/analyzers/common/src/java/org/apache/lucene/analysis/path/
H A DPathHierarchyTokenizer.java85 private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); field in class:PathHierarchyTokenizer
120 offsetAtt.setOffset(correctOffset(startPosition), finalOffset);
172 offsetAtt.setOffset(correctOffset(startPosition), finalOffset);
181 offsetAtt.setOffset(finalOffset, finalOffset);
H A DReversePathHierarchyTokenizer.java98 private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); field in class:ReversePathHierarchyTokenizer
151 offsetAtt.setOffset(correctOffset(start), correctOffset(endPosition));
162 offsetAtt.setOffset(finalOffset, finalOffset);
/lucene-3.6.0/lucene/contrib/analyzers/common/src/java/org/apache/lucene/analysis/th/
H A DThaiWordFilter.java64 private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); field in class:ThaiWordFilter
99 offsetAtt.setOffset(clonedOffsetAtt.startOffset(), clonedOffsetAtt.endOffset());
101 offsetAtt.setOffset(clonedOffsetAtt.startOffset() + start, clonedOffsetAtt.startOffset() + end);
121 hasIllegalOffsets = offsetAtt.endOffset() - offsetAtt.startOffset() != termAtt.length();
139 offsetAtt.setOffset(clonedOffsetAtt.startOffset(), clonedOffsetAtt.endOffset());
141 offsetAtt.setOffset(clonedOffsetAtt.startOffset(), clonedOffsetAtt.startOffset() + end);
/lucene-3.6.0/lucene/contrib/analyzers/common/src/test/org/apache/lucene/analysis/snowball/
H A DTestSnowball.java104 OffsetAttribute offsetAtt = filter.getAttribute(OffsetAttribute.class);
113 assertEquals(2, offsetAtt.startOffset());
114 assertEquals(7, offsetAtt.endOffset());
123 private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); field in class:TestSnowball.TestTokenStream
137 offsetAtt.setOffset(2, 7);

Completed in 159 milliseconds

123