Lvg Java
2006p Version

gov.nih.nlm.nls.lvg.Flows
Class ToSymbolNameSynonym

java.lang.Object
  extended by gov.nih.nlm.nls.lvg.Flows.Transformation
      extended by gov.nih.nlm.nls.lvg.Flows.ToSymbolNameSynonym
All Implemented Interfaces:
java.lang.Cloneable

public class ToSymbolNameSynonym
extends Transformation
implements java.lang.Cloneable

This class convert characters from a term into the synonym of unicode symbol names. The default format of the symbol name is ![symbol name]!

Users may have their own format by defining starting tag and ending tag. These tags file is configurable by modifying the configuration file.

History:

Version:
V-2006p
Author:
NLM NLS Development Team
See Also:
Design Document , Unicode Symbol Names

Field Summary
 
Fields inherited from class gov.nih.nlm.nls.lvg.Flows.Transformation
NO_MUTATE_INFO, UPDATE
 
Constructor Summary
ToSymbolNameSynonym()
           
 
Method Summary
(package private) static int GetCharFromSymbolName(java.lang.String name, java.lang.String startTag, java.lang.String endTag)
           
static java.lang.String GetSymbolNameSynonym(java.lang.String inStr, java.lang.String startTag, java.lang.String endTag, java.util.HashSet symbolSet, java.util.Hashtable diacriticMap, java.util.Hashtable ligatureMap, java.util.Hashtable symbolSynonyms)
          Get the symbol synonym for a symbol
static java.util.Hashtable GetSymbolSynonymsFromFile(Configuration config)
          Read in symbol name synonyms list from configuration file
static void main(java.lang.String[] args)
          A unit test driver for this flow component.
static java.util.Vector Mutate(LexItem in, java.lang.String startTag, java.lang.String endTag, java.util.HashSet symbolSet, java.util.Hashtable diacriticMap, java.util.Hashtable ligatureMap, java.util.Hashtable symbolSynonyms, boolean detailsFlag, boolean mutateFlag)
          Performs the mutation of this flow component.
 
Methods inherited from class gov.nih.nlm.nls.lvg.Flows.Transformation
GetTestStr, PrintResult, PrintResults, UpdateLexItem, UpdateLexItem, UpdateLexItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToSymbolNameSynonym

public ToSymbolNameSynonym()
Method Detail

Mutate

public static java.util.Vector Mutate(LexItem in,
                                      java.lang.String startTag,
                                      java.lang.String endTag,
                                      java.util.HashSet symbolSet,
                                      java.util.Hashtable diacriticMap,
                                      java.util.Hashtable ligatureMap,
                                      java.util.Hashtable symbolSynonyms,
                                      boolean detailsFlag,
                                      boolean mutateFlag)
Performs the mutation of this flow component.

Parameters:
in - a LexItem as the input for this flow component
startTag - the starting tag for symbol name (default: ![ )
endTag - the ending tag for symbol name (default: ]! )
diacriticMap - a hash table contain the mapping of diacritics
ligatureMap - a hash table contain the mapping of ligatures
symbolSynonyms - a hash table contain the synonyms of symbols
detailsFlag - a boolean flag for processing details information
mutateFlag - a boolean flag for processing mutate information
Returns:
the results from this flow component - a collection (Vector) of LexItems

GetSymbolSynonymsFromFile

public static java.util.Hashtable GetSymbolSynonymsFromFile(Configuration config)
Read in symbol name synonyms list from configuration file

Parameters:
config - Configuratin object
Returns:
a hash table of symbol name synonyms

main

public static void main(java.lang.String[] args)
A unit test driver for this flow component.


GetSymbolNameSynonym

public static java.lang.String GetSymbolNameSynonym(java.lang.String inStr,
                                                    java.lang.String startTag,
                                                    java.lang.String endTag,
                                                    java.util.HashSet symbolSet,
                                                    java.util.Hashtable diacriticMap,
                                                    java.util.Hashtable ligatureMap,
                                                    java.util.Hashtable symbolSynonyms)
Get the symbol synonym for a symbol

Parameters:
inStr - a input symbol in string
startTag - the starting tag for symbol name (default: ![ )
endTag - the ending tag for symbol name (default: ]! )
diacriticMap - a hash table contain the mapping of diacritics
ligatureMap - a hash table contain the mapping of ligatures
symbolSynonyms - a hash table contain the synonyms of symbols
Returns:
the synonym of a symbol

GetCharFromSymbolName

static int GetCharFromSymbolName(java.lang.String name,
                                 java.lang.String startTag,
                                 java.lang.String endTag)

Lvg Java
2006p Version

Submit a bug or feature

Copyright © 2006p National Library of Medicine