LinearInterpolatingScorer
public abstract class WordScorer
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static interface |
WordScorer.WordScorerFactory |
Modifier and Type | Field | Description |
---|---|---|
protected java.lang.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 | Description |
---|---|
WordScorer(org.apache.lucene.index.IndexReader reader,
java.lang.String field,
double realWordLikelyHood,
org.apache.lucene.util.BytesRef separator) |
|
WordScorer(org.apache.lucene.index.IndexReader reader,
org.apache.lucene.index.Terms terms,
java.lang.String field,
double realWordLikelyHood,
org.apache.lucene.util.BytesRef separator) |
Modifier and Type | Method | Description |
---|---|---|
protected double |
channelScore(DirectCandidateGenerator.Candidate candidate,
DirectCandidateGenerator.Candidate original) |
|
long |
frequency(org.apache.lucene.util.BytesRef term) |
|
static org.apache.lucene.util.BytesRef |
join(org.apache.lucene.util.BytesRef separator,
org.apache.lucene.util.BytesRefBuilder result,
org.apache.lucene.util.BytesRef... toJoin) |
|
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 java.lang.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, java.lang.String field, double realWordLikelyHood, org.apache.lucene.util.BytesRef separator) throws java.io.IOException
java.io.IOException
public WordScorer(org.apache.lucene.index.IndexReader reader, org.apache.lucene.index.Terms terms, java.lang.String field, double realWordLikelyHood, org.apache.lucene.util.BytesRef separator) throws java.io.IOException
java.io.IOException
public long frequency(org.apache.lucene.util.BytesRef term) throws java.io.IOException
java.io.IOException
protected double channelScore(DirectCandidateGenerator.Candidate candidate, DirectCandidateGenerator.Candidate original) throws java.io.IOException
java.io.IOException
public double score(DirectCandidateGenerator.Candidate[] path, DirectCandidateGenerator.CandidateSet[] candidateSet, int at, int gramSize) throws java.io.IOException
java.io.IOException
protected double scoreUnigram(DirectCandidateGenerator.Candidate word) throws java.io.IOException
java.io.IOException
protected double scoreBigram(DirectCandidateGenerator.Candidate word, DirectCandidateGenerator.Candidate w_1) throws java.io.IOException
java.io.IOException
protected double scoreTrigram(DirectCandidateGenerator.Candidate word, DirectCandidateGenerator.Candidate w_1, DirectCandidateGenerator.Candidate w_2) throws java.io.IOException
java.io.IOException
public static org.apache.lucene.util.BytesRef join(org.apache.lucene.util.BytesRef separator, org.apache.lucene.util.BytesRefBuilder result, org.apache.lucene.util.BytesRef... toJoin)