Révision 1067
| tmp/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/preferences/TreeTaggerPreferencePage.java (revision 1067) | ||
|---|---|---|
| 30 | 30 |
import org.eclipse.jface.preference.BooleanFieldEditor; |
| 31 | 31 |
import org.eclipse.jface.preference.DirectoryFieldEditor; |
| 32 | 32 |
import org.eclipse.jface.preference.FileFieldEditor; |
| 33 |
import org.eclipse.jface.preference.IntegerFieldEditor; |
|
| 33 | 34 |
import org.eclipse.swt.SWT; |
| 34 | 35 |
import org.eclipse.swt.layout.GridData; |
| 35 | 36 |
import org.eclipse.swt.layout.GridLayout; |
| 36 | 37 |
import org.eclipse.swt.widgets.Group; |
| 38 |
import org.eclipse.swt.widgets.Label; |
|
| 37 | 39 |
import org.eclipse.ui.IWorkbench; |
| 40 |
import org.txm.rcp.jface.DoubleFieldEditor; |
|
| 38 | 41 |
import org.txm.rcp.preferences.RCPPreferencesPage; |
| 39 | 42 |
import org.txm.rcp.preferences.TXMPreferenceStore; |
| 40 | 43 |
import org.txm.treetagger.core.preferences.TreeTaggerPreferences; |
| ... | ... | |
| 48 | 51 |
* |
| 49 | 52 |
*/ |
| 50 | 53 |
public class TreeTaggerPreferencePage extends RCPPreferencesPage {
|
| 51 |
|
|
| 54 |
|
|
| 52 | 55 |
@Override |
| 53 | 56 |
public void createFieldEditors() {
|
| 54 |
|
|
| 57 |
|
|
| 55 | 58 |
this.addField(new DirectoryFieldEditor(TreeTaggerPreferences.INSTALL_PATH, TreeTaggerUIMessages.TreeTaggerPreferencePage_1, this.getFieldEditorParent())); |
| 56 | 59 |
this.addField(new DirectoryFieldEditor(TreeTaggerPreferences.MODELS_PATH, TreeTaggerUIMessages.TreeTaggerPreferencePage_2, this.getFieldEditorParent())); |
| 60 |
|
|
| 61 |
Label l = new Label(this.getFieldEditorParent(), SWT.SEPARATOR|SWT.HORIZONTAL); |
|
| 62 |
l.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 3,1)); |
|
| 57 | 63 |
|
| 58 |
//this.addField(new StringFieldEditor(TreeTaggerPreferences.OPTIONS, TreeTaggerUIMessages.TreeTaggerPreferencePage_3, this.getFieldEditorParent())); |
|
| 64 |
this.addField(new BooleanFieldEditor(TreeTaggerPreferences.OPTIONS_DEBUG, "Activate processes debug messages", this.getFieldEditorParent())); |
|
| 65 |
|
|
| 66 |
// TREETAGGER TAGGER OPTIONS |
|
| 59 | 67 |
Group runOptions = new Group(this.getFieldEditorParent(), SWT.BORDER); |
| 60 |
runOptions.setText("TreeTagger process run options");
|
|
| 68 |
runOptions.setText("TreeTagger process options");
|
|
| 61 | 69 |
GridData gdata = new GridData(GridData.FILL, GridData.FILL, true, false, 3, 1); |
| 62 | 70 |
runOptions.setLayoutData(gdata); |
| 63 | 71 |
runOptions.setLayout(new GridLayout(3, false)); |
| 64 |
|
|
| 72 |
|
|
| 65 | 73 |
this.addField(new BooleanFieldEditor(TreeTaggerPreferences.OPTIONS_UNKNOWN, "Print the token rather than <unknown> for unknown lemmas", runOptions)); |
| 66 | 74 |
this.addField(new BooleanFieldEditor(TreeTaggerPreferences.OPTIONS_CAPHEURISTIC, "Look up unknown capitalized words in the list of lower-case words", runOptions)); |
| 67 | 75 |
this.addField(new BooleanFieldEditor(TreeTaggerPreferences.OPTIONS_HYPHENHEURISTIC, "Turn on the heuristics fur guessing the parts of speech of unknown hyphenated words", runOptions)); |
| 68 | 76 |
this.addField(new BooleanFieldEditor(TreeTaggerPreferences.OPTIONS_PROB, "Print tag probabilities", runOptions)); |
| 69 | 77 |
this.addField(new FileFieldEditor(TreeTaggerPreferences.OPTIONS_LEX, "Read auxiliary lexicon entries from a file", runOptions)); |
| 70 | 78 |
this.addField(new FileFieldEditor(TreeTaggerPreferences.OPTIONS_WC, "Read a word-class automaton from a file", runOptions)); |
| 71 |
|
|
| 72 |
this.addField(new BooleanFieldEditor(TreeTaggerPreferences.OPTIONS_DEBUG, "Activate debug messages", runOptions)); |
|
| 79 |
|
|
| 80 |
|
|
| 73 | 81 |
runOptions.setLayout(new GridLayout(3, false)); |
| 74 |
|
|
| 75 |
this.addField(new BooleanFieldEditor(TreeTaggerPreferences.FIX_APOSTROPHES, TreeTaggerUIMessages.TreeTaggerPreferencePage_0, this.getFieldEditorParent())); |
|
| 82 |
|
|
| 83 |
// TREETAGGER TRAIN OPTIONS |
|
| 84 |
Group runTrainOptions = new Group(this.getFieldEditorParent(), SWT.BORDER); |
|
| 85 |
runTrainOptions.setText("TreeTagger Train process options");
|
|
| 86 |
GridData gdata2 = new GridData(GridData.FILL, GridData.FILL, true, false, 3, 1); |
|
| 87 |
runTrainOptions.setLayoutData(gdata2); |
|
| 88 |
runTrainOptions.setLayout(new GridLayout(3, false)); |
|
| 89 |
|
|
| 90 |
this.addField(new IntegerFieldEditor(TreeTaggerPreferences.OPTIONS_CL, "consider <n> preceding tags for tagging", runTrainOptions)); |
|
| 91 |
this.addField(new DoubleFieldEditor(TreeTaggerPreferences.OPTIONS_DTG, "use <f> as threshold for decision tree gain", runTrainOptions)); |
|
| 92 |
this.addField(new DoubleFieldEditor(TreeTaggerPreferences.OPTIONS_SW, "use <f> as smoothing weight", runTrainOptions)); |
|
| 93 |
this.addField(new DoubleFieldEditor(TreeTaggerPreferences.OPTIONS_ATG, "use <f> as threshold for affix tree gain", runTrainOptions)); |
|
| 94 |
this.addField(new DoubleFieldEditor(TreeTaggerPreferences.OPTIONS_ECW, "use <f> as equivalence class weight", runTrainOptions)); |
|
| 95 |
this.addField(new DoubleFieldEditor(TreeTaggerPreferences.OPTIONS_LT, "use <f> as threshold probability for lexical entries (default 0.001)", runTrainOptions)); |
|
| 96 |
|
|
| 97 |
runTrainOptions.setLayout(new GridLayout(3, false)); |
|
| 76 | 98 |
} |
| 77 |
|
|
| 99 |
|
|
| 78 | 100 |
@Override |
| 79 | 101 |
public void init(IWorkbench workbench) {
|
| 80 | 102 |
this.setPreferenceStore(new TXMPreferenceStore(TreeTaggerPreferences.getInstance().getPreferencesNodeQualifier())); |
Formats disponibles : Unified diff