public abstract class WordScorer extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
WordScorer.WordScorerFactory |
| Modifier and Type | Field and Description |
|---|---|
protected String |
field |
protected org.apache.lucene.index.IndexReader |
reader |
protected double |
realWordLikelyhood |
protected org.apache.lucene.util.BytesRef |
separator |
protected org.apache.lucene.util.BytesRefBuilder |
spare |
protected org.apache.lucene.index.Terms |
terms |
protected long |
vocabluarySize |
| Constructor and Description |
|---|
WordScorer(org.apache.lucene.index.IndexReader reader,
String field,
double realWordLikelyHood,
org.apache.lucene.util.BytesRef separator) |
WordScorer(org.apache.lucene.index.IndexReader reader,
org.apache.lucene.index.Terms terms,
String field,
double realWordLikelyHood,
org.apache.lucene.util.BytesRef separator) |
| Modifier and Type | Method and Description |
|---|---|
protected double |
channelScore(DirectCandidateGenerator.Candidate candidate,
DirectCandidateGenerator.Candidate original) |
long |
frequency(org.apache.lucene.util.BytesRef term) |
double |
score(DirectCandidateGenerator.Candidate[] path,
DirectCandidateGenerator.CandidateSet[] candidateSet,
int at,
int gramSize) |
protected double |
scoreBigram(DirectCandidateGenerator.Candidate word,
DirectCandidateGenerator.Candidate w_1) |
protected double |
scoreTrigram(DirectCandidateGenerator.Candidate word,
DirectCandidateGenerator.Candidate w_1,
DirectCandidateGenerator.Candidate w_2) |
protected double |
scoreUnigram(DirectCandidateGenerator.Candidate word) |
protected final org.apache.lucene.index.IndexReader reader
protected final String field
protected final org.apache.lucene.index.Terms terms
protected final long vocabluarySize
protected final double realWordLikelyhood
protected final org.apache.lucene.util.BytesRefBuilder spare
protected final org.apache.lucene.util.BytesRef separator
public WordScorer(org.apache.lucene.index.IndexReader reader,
String field,
double realWordLikelyHood,
org.apache.lucene.util.BytesRef separator)
throws IOException
IOExceptionpublic WordScorer(org.apache.lucene.index.IndexReader reader,
org.apache.lucene.index.Terms terms,
String field,
double realWordLikelyHood,
org.apache.lucene.util.BytesRef separator)
throws IOException
IOExceptionpublic long frequency(org.apache.lucene.util.BytesRef term)
throws IOException
IOExceptionprotected double channelScore(DirectCandidateGenerator.Candidate candidate, DirectCandidateGenerator.Candidate original) throws IOException
IOExceptionpublic double score(DirectCandidateGenerator.Candidate[] path, DirectCandidateGenerator.CandidateSet[] candidateSet, int at, int gramSize) throws IOException
IOExceptionprotected double scoreUnigram(DirectCandidateGenerator.Candidate word) throws IOException
IOExceptionprotected double scoreBigram(DirectCandidateGenerator.Candidate word, DirectCandidateGenerator.Candidate w_1) throws IOException
IOExceptionprotected double scoreTrigram(DirectCandidateGenerator.Candidate word, DirectCandidateGenerator.Candidate w_1, DirectCandidateGenerator.Candidate w_2) throws IOException
IOExceptionCopyright © 2009–2017. All rights reserved.