|
TC Java 2011 Version |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.nih.nlm.nls.tc.Api.StWsdApi
public class StWsdApi
This class provides Word Sense Disambiguation Tool API using STI. It takes a in text, ambiguous word, choices (Sts), and score type as input.
History:
| Field Summary | |
|---|---|
protected Configuration |
conf_
|
protected java.lang.String |
configFile_
|
protected JournalDescriptors |
jds_
|
protected SemanticTypes |
sts_
|
static int |
TYPE_CS
|
static int |
TYPE_DC
|
static int |
TYPE_WC
|
protected boolean |
verbose_
|
| Constructor Summary | |
|---|---|
StWsdApi(Configuration conf)
Creates an WsdApi object and initiate related data, using a specified configuration object. |
|
StWsdApi(Configuration conf,
SemanticTypes sts,
JournalDescriptors jds)
Creates an WsdApi object and initiate related data, using a specified configuration object and semantic types object. |
|
StWsdApi(java.sql.Connection conn)
Creates an WsdApi object and initiate related data, using a specified database connection object. |
|
StWsdApi(java.sql.Connection conn,
SemanticTypes sts,
JournalDescriptors jds)
Creates an WsdApi object and initiate related data, using a specified database connection object and semantic types object. |
|
StWsdApi(java.util.Hashtable<java.lang.String,java.lang.String> properties)
Creates an WsdApi object and initiate related data, using a specified properties to be overwritten in configuration. |
|
StWsdApi(java.lang.String configFile)
Creates an WsdApi object and initiate related data, using a specified configuration file. |
|
| Method Summary | |
|---|---|
void |
Close()
Close STI database connection. |
java.lang.String |
GetDetailStr()
Get WSD Detail String. |
java.lang.String |
GetErrStr()
Get WSD Error String. |
JournalDescriptors |
GetJournalDescriptors()
Get the Journal Descriptor object. |
SemanticTypes |
GetSemanticTypes()
Get the Semantic Types object. |
java.lang.String |
GetStAbbrForWsd(java.lang.String inSentence,
java.lang.String ambiguousWord,
java.util.Vector<java.lang.String> stCandidates)
Get ST abbreviatoin for WSD. |
java.lang.String |
GetStAbbrForWsd(java.lang.String inSentence,
java.lang.String ambiguousWord,
java.util.Vector<java.lang.String> stCandidates,
int methodType,
boolean detailFlag,
boolean useAmbiguousSentences,
boolean useRealTimeMethod)
Get ST abbreviatoin for WSD. |
java.lang.String |
GetStAbbrForWsd(java.lang.String inSentence,
java.lang.String ambiguousWord,
java.util.Vector<java.lang.String> stCandidates,
int methodType,
boolean detailFlag,
boolean useAmbiguousSentences,
boolean useRealTimeMethod,
java.lang.String version)
Get ST abbreviatoin for WSD. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TYPE_WC
public static final int TYPE_DC
public static final int TYPE_CS
protected java.lang.String configFile_
protected Configuration conf_
protected boolean verbose_
protected SemanticTypes sts_
protected JournalDescriptors jds_
| Constructor Detail |
|---|
public StWsdApi(Configuration conf)
Close( ) method must be called to close Db connection after using a WsdApi object.
conf - Configuration objectpublic StWsdApi(java.lang.String configFile)
Close( ) method must be called to close Db connection after using a WsdApi object.
configFile - the absolute path of the configuration filepublic StWsdApi(java.sql.Connection conn)
Close( ) method must be called to close Db connection after using a WsdApi object.
conn - Db connection objectpublic StWsdApi(java.util.Hashtable<java.lang.String,java.lang.String> properties)
Close( ) method must be called to close Db connection after using a WsdApi object.
properties - properties to be overwrite in configuration
public StWsdApi(Configuration conf,
SemanticTypes sts,
JournalDescriptors jds)
Close( ) method must be called to close Db connection after using a WsdApi object.
conf - Configuration objectsts - Semantic types objectsjds - Journal descriptor object
public StWsdApi(java.sql.Connection conn,
SemanticTypes sts,
JournalDescriptors jds)
Close( ) method must be called to close Db connection after using a WsdApi object.
conn - Database connection objectsts - Semantic types objects| Method Detail |
|---|
public java.lang.String GetStAbbrForWsd(java.lang.String inSentence,
java.lang.String ambiguousWord,
java.util.Vector<java.lang.String> stCandidates)
inSentence - input sentences (phrase, TI, AB)ambiguousWord - the ambiguous word to be disambuguationstCandidates - ST candidates in abbreviations for possible senses
public java.lang.String GetStAbbrForWsd(java.lang.String inSentence,
java.lang.String ambiguousWord,
java.util.Vector<java.lang.String> stCandidates,
int methodType,
boolean detailFlag,
boolean useAmbiguousSentences,
boolean useRealTimeMethod)
inSentence - input sentences (phrase, TI, AB)ambiguousWord - the ambiguous word to be disambuguationstCandidates - ST candidates in abbreviations for possible sensesmethodType - WC, DC, or CS (combined scores)detailFlag - a flag to show detail debug infromationuseAmbiguousSentences - a flag to use ambiguous sentences onlyuseRealTimeMethod - a flag to use real-time method, Stri
public java.lang.String GetStAbbrForWsd(java.lang.String inSentence,
java.lang.String ambiguousWord,
java.util.Vector<java.lang.String> stCandidates,
int methodType,
boolean detailFlag,
boolean useAmbiguousSentences,
boolean useRealTimeMethod,
java.lang.String version)
inSentence - input sentences (phrase, TI, AB)ambiguousWord - the ambiguous word to be disambuguationstCandidates - ST candidates in abbreviations for possible sensesmethodType - WC, DC, or CS (combined scores)detailFlag - a flag to show detail debug infromationuseAmbiguousSentences - a flag to use ambiguous sentences onlyuseRealTimeMethod - a flag to use real-time method, Striversion - the specified verion to run
public SemanticTypes GetSemanticTypes()
public JournalDescriptors GetJournalDescriptors()
public java.lang.String GetDetailStr()
public java.lang.String GetErrStr()
public void Close()
|
TC Java 2011 Version |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||