public class MetaMatch
extends java.lang.Object
Constructor and Description |
---|
MetaMatch()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected float |
getReferenceWeight(ResolvedConceptReference ref,
java.util.List<java.lang.String> matchWords)
Return a relative weight between 0 and 1 that indicates how well the
given reference maps to a set of words.
|
protected float |
getTextWeight(java.lang.String text,
java.util.List<java.lang.String> matchWords)
Return a relative weight between 0 and 1 that indicates how well the
given string maps to a set of words.
|
static void |
main(java.lang.String[] args)
Entry point for processing.
|
protected void |
matchSpell(java.lang.String s,
LexBIGService lbSvc,
java.lang.String scheme,
CodingSchemeVersionOrTag csvt)
Attempt to approximate spelling suggestions.
|
protected void |
matchSubquery(java.lang.String s,
LexBIGService lbSvc,
java.lang.String scheme,
CodingSchemeVersionOrTag csvt)
Attempt to approximate compositional or sub-query match (e.g.,
"peptic ulcer" will match the two separate entries for "peptic" and
"ulcer", in case the ontology does not contain any entry matching the
full text "peptic ulcer").
|
protected void |
matchSynonyms(java.lang.String s,
LexBIGService lbSvc,
java.lang.String scheme,
CodingSchemeVersionOrTag csvt)
Display concepts and related text strings matching the given string.
|
protected void |
matchTermCompletion(java.lang.String s,
LexBIGService lbSvc,
java.lang.String scheme,
CodingSchemeVersionOrTag csvt)
Attempt to approximate term completion.
|
protected void |
matchWordCompletion(java.lang.String s,
LexBIGService lbSvc,
java.lang.String scheme,
CodingSchemeVersionOrTag csvt)
Attempt to approximate word completion.
|
protected void |
printText(ResolvedConceptReference ref)
Print code and text for all text presentations associated with the given
node reference.
|
protected void |
printText(ResolvedConceptReference ref,
boolean removeStopWords,
java.lang.String prefix,
int wordCount)
Print code and text for all text presentations associated with the given
concept reference.
|
protected void |
printText(ResolvedConceptReference ref,
java.lang.String[] matchWords,
int matchOption)
Print code and text for all text presentations associated with the given
concept reference.
|
void |
run(java.lang.String s) |
protected java.lang.String[] |
toWords(java.lang.String s,
boolean removeStopWords)
Returns an array containing the individual white-space delimited words
contained by the given string, normalizing to lowercase and optionally
removing stop words.
|
public static void main(java.lang.String[] args)
args
- public void run(java.lang.String s) throws LBException
LBException
protected void matchSynonyms(java.lang.String s, LexBIGService lbSvc, java.lang.String scheme, CodingSchemeVersionOrTag csvt) throws LBException
s
- The test string.lbSvc
- scheme
- csvt
- LBException
protected void matchSpell(java.lang.String s, LexBIGService lbSvc, java.lang.String scheme, CodingSchemeVersionOrTag csvt) throws LBException
s
- The test string.lbSvc
- scheme
- csvt
- LBException
protected void matchTermCompletion(java.lang.String s, LexBIGService lbSvc, java.lang.String scheme, CodingSchemeVersionOrTag csvt) throws LBException
s
- The test string.lbSvc
- scheme
- csvt
- LBException
protected void matchWordCompletion(java.lang.String s, LexBIGService lbSvc, java.lang.String scheme, CodingSchemeVersionOrTag csvt) throws LBException
s
- The test string.lbSvc
- scheme
- csvt
- LBException
protected void matchSubquery(java.lang.String s, LexBIGService lbSvc, java.lang.String scheme, CodingSchemeVersionOrTag csvt) throws LBException
s
- The test string.lbSvc
- scheme
- csvt
- LBException
protected float getReferenceWeight(ResolvedConceptReference ref, java.util.List<java.lang.String> matchWords)
ref
- matchWords
- protected float getTextWeight(java.lang.String text, java.util.List<java.lang.String> matchWords)
ref
- matchWords
- protected void printText(ResolvedConceptReference ref)
ref
- protected void printText(ResolvedConceptReference ref, boolean removeStopWords, java.lang.String prefix, int wordCount)
ref
- removeStopWords
- prefix
- wordCount
- protected void printText(ResolvedConceptReference ref, java.lang.String[] matchWords, int matchOption)
ref
- matchWords
- matchOption
- protected java.lang.String[] toWords(java.lang.String s, boolean removeStopWords)
s
- removeStopWords
-