本文整理汇总了Java中org.apache.lucene.analysis.tokenattributes.PackedTokenAttributeImpl.append方法的典型用法代码示例。如果您正苦于以下问题:Java PackedTokenAttributeImpl.append方法的具体用法?Java PackedTokenAttributeImpl.append怎么用?Java PackedTokenAttributeImpl.append使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.lucene.analysis.tokenattributes.PackedTokenAttributeImpl
的用法示例。
在下文中一共展示了PackedTokenAttributeImpl.append方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: eudex
import org.apache.lucene.analysis.tokenattributes.PackedTokenAttributeImpl; //导入方法依赖的package包/类
protected PackedTokenAttributeImpl eudex() throws CharacterCodingException {
String term = new String(termAtt.buffer(), 0, termAtt.length());
CharSequence s = Long.toHexString(eudex.encode(term));
PackedTokenAttributeImpl impl = new PackedTokenAttributeImpl();
impl.append(s);
return impl;
}
示例2: process
import org.apache.lucene.analysis.tokenattributes.PackedTokenAttributeImpl; //导入方法依赖的package包/类
protected void process() throws CharacterCodingException {
String term = new String(termAtt.buffer(), 0, termAtt.length());
for (CharSequence charSequence : process(term)) {
if (charSequence != null) {
PackedTokenAttributeImpl token = new PackedTokenAttributeImpl();
token.append(charSequence);
tokens.add(token);
}
}
}
示例3: detect
import org.apache.lucene.analysis.tokenattributes.PackedTokenAttributeImpl; //导入方法依赖的package包/类
private void detect() throws CharacterCodingException {
CharSequence term = new String(termAtt.buffer(), 0, termAtt.length());
Collection<CharSequence> variants = service.lookup(settings, term);
for (CharSequence ch : variants) {
if (ch != null) {
PackedTokenAttributeImpl token = new PackedTokenAttributeImpl();
token.append(ch);
tokens.add(token);
}
}
}
示例4: baseform
import org.apache.lucene.analysis.tokenattributes.PackedTokenAttributeImpl; //导入方法依赖的package包/类
protected void baseform() throws CharacterCodingException {
CharSequence term = new String(termAtt.buffer(), 0, termAtt.length());
CharSequence s = dictionary.lookup(term);
if (s != null && s.length() > 0) {
PackedTokenAttributeImpl impl = new PackedTokenAttributeImpl();
impl.append(s);
tokens.add(impl);
}
}
示例5: detect
import org.apache.lucene.analysis.tokenattributes.PackedTokenAttributeImpl; //导入方法依赖的package包/类
protected void detect() throws CharacterCodingException {
CharSequence term = new String(termAtt.buffer(), 0, termAtt.length());
Collection<CharSequence> variants = standardNumberService.lookup(term);
for (CharSequence ch : variants) {
if (ch != null) {
PackedTokenAttributeImpl token = new PackedTokenAttributeImpl();
token.append(ch);
tokens.add(token);
}
}
}
示例6: detect
import org.apache.lucene.analysis.tokenattributes.PackedTokenAttributeImpl; //导入方法依赖的package包/类
protected void detect() throws CharacterCodingException {
CharSequence term = new String(termAtt.buffer(), 0, termAtt.length());
Collection<CharSequence> variants = service.lookup(settings, term);
for (CharSequence ch : variants) {
if (ch != null) {
PackedTokenAttributeImpl token = new PackedTokenAttributeImpl();
token.append(ch);
tokens.add(token);
}
}
}
开发者ID:jprante,项目名称:elasticsearch-analysis-standardnumber,代码行数:12,代码来源:StandardNumberTokenFilter.java