edu.stanford.nlp.wsd
Class SensevalFormatConverter

java.lang.Object
  |
  +--edu.stanford.nlp.wsd.SensevalFormatConverter

public class SensevalFormatConverter
extends Object

Class with methods for converting and padding Senseval-1 and Senseval-2 format files to CS224N format files.


Constructor Summary
SensevalFormatConverter()
           
 
Method Summary
 void convertAll1()
          Converts all files in /u/nlp/data/senseval2/2000_data/ from Senseval-1 format to CS224N format
 void convertAll1(String word)
          Converts the files in /u/nlp/data/senseval2/2000_data/ corresponding to word word from Senseval-1 format to CS224N format
 void convertAll2(String trainfile, String testfile)
          Converts the files in /u/nlp/data/senseval2/2001_data to CS224N format
 void convertAnswers(String word)
          Converts a Senseval-1 answers file to a CS224N answers file.
 void convertAnswers(String word, String indir, String outdir)
          Converts a Senseval-1 answers file to a CS224N answers file.
 void convertTest(String word)
          Converts Senseval-1 format test file to cs224n format test file.
 void convertTest(String word, String indir, String outdir)
          Converts a Senseval-1 format test file to a cs224n format training file.
 void convertTrain(String word)
          converts Senseval-1 format training file /u/nlp/data/senseval2/2000_data/TRAIN/word.cor to cs224n format training file /u/nlp/data/senseval2/2000_data/cs224n_format/unpadded/word-unpadded.train
 void convertTrain(String word, String indir, String outdir)
          converts a Senseval-1 format training file indir/word.cor to a cs224n format training file outdir/word-unpadded.train
static void main(String[] args)
           
 void pad(String word, String trainortest, String indir, String outdir)
          pads a cs224n training or testing file indir/word-unpadded.train or indir/word-unpadded.test to ensure that each target word has at least 5 words on either side.
 void pad1(String word, String trainortest)
          pads a cs224n training or testing file /u/nlp/data/senseval2/2000_data/cs224n_format/unpadded/word-unpadded.train (or .test) and outputs it to /u/nlp/data/senseval2/2000_data/word.train.
 void pad2(String word, String trainortest)
          pads a cs224n training or testing file /u/nlp/data/senseval2/2001_data/cs224n_format/unpadded/word-unpadded.train (or .test) and outputs it to /u/nlp/data/senseval2/2001_data/word.train.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SensevalFormatConverter

public SensevalFormatConverter()
Method Detail

convertTrain

public void convertTrain(String word)
converts Senseval-1 format training file /u/nlp/data/senseval2/2000_data/TRAIN/word.cor to cs224n format training file /u/nlp/data/senseval2/2000_data/cs224n_format/unpadded/word-unpadded.train


convertTrain

public void convertTrain(String word,
                         String indir,
                         String outdir)
converts a Senseval-1 format training file indir/word.cor to a cs224n format training file outdir/word-unpadded.train


pad1

public void pad1(String word,
                 String trainortest)
pads a cs224n training or testing file /u/nlp/data/senseval2/2000_data/cs224n_format/unpadded/word-unpadded.train (or .test) and outputs it to /u/nlp/data/senseval2/2000_data/word.train. (or .test)


pad2

public void pad2(String word,
                 String trainortest)
pads a cs224n training or testing file /u/nlp/data/senseval2/2001_data/cs224n_format/unpadded/word-unpadded.train (or .test) and outputs it to /u/nlp/data/senseval2/2001_data/word.train. (or .test)


pad

public void pad(String word,
                String trainortest,
                String indir,
                String outdir)
pads a cs224n training or testing file indir/word-unpadded.train or indir/word-unpadded.test to ensure that each target word has at least 5 words on either side. Outputs outdir/word.train or outdir/word.test

Parameters:
trainortest - String specifying whether it's a training or testing file. "train" specifies training file, "test" specifies testing file.

convertTest

public void convertTest(String word)
Converts Senseval-1 format test file to cs224n format test file. Converts from /u/nlp/data/senseval2/2000_data/TEST/word-?.eval to /u/nlp/data/senseval2/2000_data/cs224n_format/unpadded/word-?-unpadded.test.


convertTest

public void convertTest(String word,
                        String indir,
                        String outdir)
Converts a Senseval-1 format test file to a cs224n format training file. Converts from indir/word-?.eval to outdir/word-?-unpadded.test


convertAnswers

public void convertAnswers(String word)
Converts a Senseval-1 answers file to a CS224N answers file. Converts a Senseval-1 format answers file /u/nlp/data/senseval2/2000_data/GOLD/word-? to a cs224n format answers file /u/nlp/data/senseval2/2000_data/cs224n_format/word-?.answers


convertAnswers

public void convertAnswers(String word,
                           String indir,
                           String outdir)
Converts a Senseval-1 answers file to a CS224N answers file. converts a Senseval-1 format answers file indir/word-? to a cs224n format answers file outdir/word-?.answers


convertAll1

public void convertAll1()
Converts all files in /u/nlp/data/senseval2/2000_data/ from Senseval-1 format to CS224N format


convertAll1

public void convertAll1(String word)
Converts the files in /u/nlp/data/senseval2/2000_data/ corresponding to word word from Senseval-1 format to CS224N format


convertAll2

public void convertAll2(String trainfile,
                        String testfile)
Converts the files in /u/nlp/data/senseval2/2001_data to CS224N format


main

public static void main(String[] args)


Stanford NLP Group