public class Finder extends Object implements Closeable
Constructor and Description |
---|
Finder(File aIndexFolder,
File nGramFolder)
Constructor for the finder.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
contains(String aWord) |
List<NGramModel> |
find(String aGram)
Find all n-grams in the index.
|
List<NGramModel> |
find(String[] aToken)
Find all n-grams containing these tokens in order but optionally with words between them.
|
BigInteger |
freq(String aUnigram) |
BigInteger |
getUnigramCount() |
public Finder(File aIndexFolder, File nGramFolder) throws IOException
aIndexFolder
- The folder to the Lucene index or a folder with multiple indexes.nGramFolder
- The folder to the JWeb1T n-grams.IOException
- if the data could not be read.public BigInteger freq(String aUnigram)
public BigInteger getUnigramCount()
public List<NGramModel> find(String aGram)
aGram
- A String of token split by spacepublic List<NGramModel> find(String[] aToken)
aToken
- A list of tokenspublic boolean contains(String aWord)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2007–2018 Ubiquitous Knowledge Processing (UKP) Lab, Technische Universität Darmstadt. All rights reserved.