예제 #1
0
 /// <summary>Stores the passed-in TreebankLanguagePack and sets up charset encodings.</summary>
 /// <param name="tlp">The treebank language pack to use</param>
 protected internal AbstractTreebankParserParams(ITreebankLanguagePack tlp)
 {
     // end class RemoveGFSubcategoryStripper
     this.tlp       = tlp;
     inputEncoding  = tlp.GetEncoding();
     outputEncoding = tlp.GetEncoding();
     generateOriginalDependencies = false;
 }
예제 #2
0
 /// <summary>Creates new form ParserPanel</summary>
 public ParserPanel()
 {
     // constants for language specification
     // one second in milliseconds
     // parser takes approximately a minute to load
     // parser takes 5-60 seconds to parse a sentence
     // constants for finding nearest sentence boundary
     // for highlighting
     // worker threads to handle long operations
     // to monitor progress of long operations
     //private ProgressMonitor progressMonitor;
     // progress count
     // use glass pane to block input to components other than progressMonitor
     InitComponents();
     // create dialogs for file selection
     jfc        = new JFileChooser(Runtime.GetProperty("user.dir"));
     pageDialog = new OpenPageDialog(new Frame(), true);
     pageDialog.SetFileChooser(jfc);
     jfcLocation = new ParserPanel.JFileChooserLocation(jfc);
     tlp         = new PennTreebankLanguagePack();
     encoding    = tlp.GetEncoding();
     SetFont();
     // create a timer
     timer = new Timer(OneSecond, new ParserPanel.TimerListener(this));
     // for (un)highlighting text
     highlightStyle = new SimpleAttributeSet();
     normalStyle    = new SimpleAttributeSet();
     StyleConstants.SetBackground(highlightStyle, Color.yellow);
     StyleConstants.SetBackground(normalStyle, textPane.GetBackground());
     this.chooseJarParser = new JarFileChooser(".*\\.ser\\.gz", this);
 }