|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ctakes.dictionary.assertion.CreateAssertionLuceneIndexFromDelimitedFile
public class CreateAssertionLuceneIndexFromDelimitedFile
Driver for populating a Lucene Index with assertion cue phrases, so that the tokenization of the dictionary entries matches the tokenization that will be done to clinical text during pipeline processing. Just as the pipeline can use a file of hyphenated words to control which words should be considered as a single token, the creation of the dictionary entries can use a file of hyphenated words so the dictionary entries are tokenized in the same way as the clinical text will be.
Field Summary | |
---|---|
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 Summary | |
---|---|
CreateAssertionLuceneIndexFromDelimitedFile(TokenizerPTB tokenizer)
Constructor |
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public CreateAssertionLuceneIndexFromDelimitedFile(TokenizerPTB tokenizer) throws Exception
Tokenizer
- Used to tokenize the dictionary entries
Exception
Method Detail |
---|
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |