|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.LexGrid.LexBIG.example.MetaMatch
public class MetaMatch
Example attempting to approximate some characteristics of the Metaphrase search algorithm. However, full Metaphrase compatibility is not anticipated.
Constructor Summary | |
---|---|
MetaMatch()
Default constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MetaMatch()
Method Detail |
---|
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
-
|
Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |