public class LanguageFormatter extends Object
| Constructor and Description |
|---|
LanguageFormatter(String stmt,
Map<String,String> phraseMap,
Map<String,String> termMap,
KB kb,
String language) |
| Modifier and Type | Method and Description |
|---|---|
String |
htmlParaphrase(String href)
Hyperlink terms in a natural language format string.
|
static void |
main(String[] args) |
void |
setDoInformalNLG(boolean doIt) |
static String |
variableReplace(String form,
Map<String,Set<String>> instMap,
HashMap<String,Set<String>> classMap,
KB kb,
String language)
Replace variables in a formula with paraphrases expressing their
type.
|
public LanguageFormatter(String stmt, Map<String,String> phraseMap, Map<String,String> termMap, KB kb, String language)
stmt - The statement to be formatted.phraseMap - kb.getFormatMap() for this languagetermMap - kb.getTermFormatMap() for this languagekb - language - public void setDoInformalNLG(boolean doIt)
public String htmlParaphrase(String href)
href - the anchor string up to the term= parameter, which this method
will fill in.public static String variableReplace(String form, Map<String,Set<String>> instMap, HashMap<String,Set<String>> classMap, KB kb, String language)
public static void main(String[] args)
Copyright © 2015. All rights reserved.