public class CreateAssertionLuceneIndexFromDelimitedFile extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CUE_PHRASE_CATEGORY_FIELD_NAME |
static String |
CUE_PHRASE_FAMILY_FIELD_NAME |
static String |
CUE_PHRASE_FIELD_NAME |
static String |
CUE_PHRASE_FIRST_WORD_FIELD_NAME |
Constructor and Description |
---|
CreateAssertionLuceneIndexFromDelimitedFile(TokenizerPTB tokenizer)
Constructor
|
Modifier and Type | Method and Description |
---|---|
static String |
getUsage() |
static String |
load(String filename)
Loads text from a file.
|
static Map |
loadHyphMap(String filename)
Loads hyphenated words and a frequency value for each, from a file.
|
static void |
main(String[] args) |
static void |
printResults(String text,
List results)
Prints out the tokenized results, for debug use.
|
void |
writeToFile(String str) |
protected void |
writeToFormatLucene(String cuePhrase,
String cuePhraseCategory,
String cuePhraseFamily) |
public static final String CUE_PHRASE_FIELD_NAME
public static final String CUE_PHRASE_CATEGORY_FIELD_NAME
public static final String CUE_PHRASE_FAMILY_FIELD_NAME
public static final String CUE_PHRASE_FIRST_WORD_FIELD_NAME
public CreateAssertionLuceneIndexFromDelimitedFile(TokenizerPTB tokenizer) throws Exception
Tokenizer
- Used to tokenize the dictionary entriesException
public static void main(String[] args)
public static String load(String filename) throws FileNotFoundException, IOException
filename
- FileNotFoundException
IOException
public static Map loadHyphMap(String filename) throws FileNotFoundException, IOException
filename
- FileNotFoundException
IOException
public static void printResults(String text, List results)
text
- results
- public static String getUsage()
protected void writeToFormatLucene(String cuePhrase, String cuePhraseCategory, String cuePhraseFamily)
public void writeToFile(String str)
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.