uk.ac.man.entitytagger.entities.misc
Class DrugBank

java.lang.Object
  extended by uk.ac.man.entitytagger.entities.misc.DrugBank

public class DrugBank
extends java.lang.Object

This class will, given a DrugBank data file, parse its contents and output a tab-delimited regular expression file suitable for import by the automaton generating software. Using it, an automaton can be generated that may be used to locate and identify drug names as specified by DrugBank.

Author:
Martin Gerner

Constructor Summary
DrugBank()
           
 
Method Summary
private static java.lang.String escape(java.lang.String s)
           
private static java.util.Set<java.lang.String> loadStopwords(java.io.File file, java.util.logging.Logger logger)
           
static void main(java.lang.String[] args)
           
private static void run(java.io.File inFile, java.io.File outFile, java.util.Set<java.lang.String> stopset, java.util.logging.Logger logger)
           
private static java.lang.String toregexp(java.util.Set<java.lang.String> names)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrugBank

public DrugBank()
Method Detail

main

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

loadStopwords

private static java.util.Set<java.lang.String> loadStopwords(java.io.File file,
                                                             java.util.logging.Logger logger)

run

private static void run(java.io.File inFile,
                        java.io.File outFile,
                        java.util.Set<java.lang.String> stopset,
                        java.util.logging.Logger logger)

toregexp

private static java.lang.String toregexp(java.util.Set<java.lang.String> names)

escape

private static java.lang.String escape(java.lang.String s)