TC Java
2011 Version

gov.nih.nlm.nls.tc.Jdi
Class Contractions

java.lang.Object
  extended by gov.nih.nlm.nls.tc.Jdi.Contractions

public class Contractions
extends java.lang.Object

This class is to read contractions and expansion from a flat file.

History:

Version:
V-2011
Author:
NLM Lexical Systems Group

Constructor Summary
Contractions(java.lang.String inFile)
          Create the Contractions list object by specifying the input file.
Contractions(java.lang.String inFile, boolean verbose)
          Create the Contractions list object by specifying the input file.
 
Method Summary
 java.util.Hashtable<java.lang.String,java.lang.String> GetContractions()
          Get the collection object (in hashtable) of contractions with key in contractions and value in expansions.
 java.lang.String GetExpansion(java.lang.String contractionStr)
          Get the expansion by specifying the contractions.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Contractions

public Contractions(java.lang.String inFile)
Create the Contractions list object by specifying the input file.

Parameters:
inFile - file name of contractions (contractions.txt)

Contractions

public Contractions(java.lang.String inFile,
                    boolean verbose)
Create the Contractions list object by specifying the input file.

Parameters:
inFile - file name of contractions (contractions.txt)
verbose - flag of verbose on reading input file
Method Detail

GetContractions

public java.util.Hashtable<java.lang.String,java.lang.String> GetContractions()
Get the collection object (in hashtable) of contractions with key in contractions and value in expansions.

Returns:
a hashtable of all contractions with key in contractions and value in expansions.

GetExpansion

public java.lang.String GetExpansion(java.lang.String contractionStr)
Get the expansion by specifying the contractions.

Parameters:
contractionStr - contraction in string
Returns:
expansions

main

public static void main(java.lang.String[] args)

TC Java
2011 Version

Submit a bug or feature

Copyright © 2011 National Library of Medicine