Révision 3897

TXM/trunk/bundles/org.txm.treetagger.core/src/org/txm/importer/xmltxm/Annotate.groovy (revision 3897)
234 234
			} else {
235 235
				tt.setquiet();
236 236
			}
237
			if (TreeTaggerPreferences.getInstance().getBoolean(TreeTaggerPreferences.OPTIONS_CAPHEURISTIC)) {
238
				tt.setcapheuristics();
239
			}
240 237
			if (TreeTaggerPreferences.getInstance().getBoolean(TreeTaggerPreferences.OPTIONS_HYPHENHEURISTIC)) {
241 238
				tt.sethyphenheuristics();
242 239
			}
TXM/trunk/bundles/org.txm.treetagger.core/src/org/txm/treetagger/core/TreeTaggerEngine.java (revision 3897)
48 48
	
49 49
	@Override
50 50
	public boolean stop() throws Exception {
51
		
51 52
		ttBinaryDirectory = null;
52 53
		ttModelsDirectory = null;
53 54
		for (TreeTagger tt : instances.values()) {
......
59 60
	
60 61
	@Override
61 62
	public String getName() {
63
		
62 64
		return "TreeTagger";
63 65
	}
64 66
	
65 67
	@Override
66 68
	public boolean initialize() {
69
		
67 70
		return true;
68 71
	}
69 72
	
70 73
	@Override
71 74
	public boolean start(IProgressMonitor monitor) {
75
		
72 76
		return true;
73 77
	}
74 78
	
75 79
	public TreeTagger getInstance(File modelFile) {
80
		
76 81
		if (!instances.containsKey(modelFile)) {
77 82
			instances.put(modelFile, new TreeTagger(ttBinaryDirectory.getAbsolutePath(), options));
78 83
		}
......
81 86
	
82 87
	@Override
83 88
	public boolean processFile(File xmlFile, File binaryCorpusDirectory, HashMap<String, Object> parameters) {
89
		
84 90
		if (!isRunning()) return false;
85 91
		
86 92
		String lang = null;
......
137 143
	 */
138 144
	@Override
139 145
	public boolean processDirectory(File xmlFilesDirectory, File binaryCorpusDirectory, HashMap<String, Object> parameters) {
146
		
140 147
		Object p = parameters.get("langs");
141 148
		if (p != null && p instanceof HashMap<?, ?>) {
142 149
			
......
159 166
	}
160 167
	
161 168
	public static boolean canAnnotateLang(String lang) {
169
		
162 170
		if (lang == null) {
163 171
			Log.warning("** Error: not lang given (null)");
164 172
			return false;
......
179 187
	
180 188
	@Override
181 189
	public boolean isAutomatic() {
190
		
182 191
		return true;
183 192
	}
184 193
	
......
189 198
	
190 199
	@Override
191 200
	public String getDetails() {
201
		
192 202
		return "TreeTagger files: binaries=" + ttBinaryDirectory + " models=" + ttModelsDirectory + " current instances=" + instances.toString();
193 203
	}
194 204
	
......
197 207
	 */
198 208
	@Override
199 209
	public boolean hasAnnotationsToSave(CorpusBuild corpus) {
210
		
200 211
		return false;
201 212
	}
202 213
}
TXM/trunk/bundles/org.txm.treetagger.core/src/org/txm/treetagger/core/preferences/TreeTaggerPreferences.java (revision 3897)
52 52
	public static final String OPTIONS_WC = "wc"; //$NON-NLS-1$
53 53
	public static final String OPTIONS_UNKNOWN = "unknown"; //$NON-NLS-1$
54 54
	public static final String OPTIONS_DEBUG = "debug"; //$NON-NLS-1$
55
	public static final String OPTIONS_CAPHEURISTIC = "cap_heuristic"; //$NON-NLS-1$
56 55
	public static final String OPTIONS_HYPHENHEURISTIC = "hyphen_heuristic"; //$NON-NLS-1$
57 56
	public static final String OPTIONS_PROB = "prob"; //$NON-NLS-1$
58 57
	public static final String OPTIONS_CL = "cl";
......
101 100
		preferences.putBoolean(FIX_APOSTROPHES, false);
102 101

  
103 102
		preferences.putBoolean(OPTIONS_DEBUG, false);
104
		preferences.putBoolean(OPTIONS_CAPHEURISTIC, true);
105 103
		preferences.putBoolean(OPTIONS_HYPHENHEURISTIC, false);
106 104
		preferences.putBoolean(OPTIONS_UNKNOWN, true);
107 105
		preferences.putBoolean(OPTIONS_PROB, false);

Formats disponibles : Unified diff