mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
added English synonyms
This commit is contained in:
parent
5408448a56
commit
f3f1b2e899
30275
addon/synonyms/mobythesaurus_en_yacy
Normal file
30275
addon/synonyms/mobythesaurus_en_yacy
Normal file
File diff suppressed because one or more lines are too long
|
@ -221,6 +221,16 @@
|
|||
<dt>Action</dt>
|
||||
<dd>#(syn0Status)#<input type="submit" name="syn0Activate" value="Activate" />::<input type="submit" name="syn0Deactivate" value="Deactivate" />#(/syn0Status)#</dd>
|
||||
</dl>
|
||||
|
||||
<h4><a href="http://icon.shef.ac.uk/Moby/" target="_blank">Moby Lexicon - English Thesaurus from http://icon.shef.ac.uk/Moby/</a></h4>
|
||||
<p>The data from this source was converted to the YaCy synonym file format and part of the YaCy distribution.</p>
|
||||
|
||||
<dl>
|
||||
<dt><label>Status</label></dt>
|
||||
<dd>#(syn1Status)#<div class="info">Deactivated</div>::<div class="commit">Activated</div>#(/syn1Status)#</dd>
|
||||
<dt>Action</dt>
|
||||
<dd>#(syn1Status)#<input type="submit" name="syn1Activate" value="Activate" />::<input type="submit" name="syn1Deactivate" value="Deactivate" />#(/syn1Status)#</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
</form>
|
||||
#%env/templates/footer.template%#
|
||||
|
|
|
@ -305,8 +305,27 @@ public class DictionaryLoader_p {
|
|||
}
|
||||
SynonymLibrary.init(synonyms_path);
|
||||
}
|
||||
|
||||
prop.put("syn0Status", synonym_de_production.exists() ? 1 : 0);
|
||||
|
||||
final File synonym_en_default = new File(new File(new File(sb.appPath, "addon"), "synonyms"), "mobythesaurus_en_yacy");
|
||||
final File synonym_en_production = new File(synonyms_path, synonym_en_default.getName());
|
||||
if (post.containsKey("syn1Deactivate")) {
|
||||
synonym_en_production.delete();
|
||||
SynonymLibrary.init(synonyms_path);
|
||||
}
|
||||
|
||||
if (post.containsKey("syn1Activate")) {
|
||||
try {
|
||||
FileUtils.copy(new FileInputStream(synonym_en_default), synonym_en_production);
|
||||
} catch (IOException e) {
|
||||
ConcurrentLog.logException(e);
|
||||
}
|
||||
SynonymLibrary.init(synonyms_path);
|
||||
}
|
||||
|
||||
prop.put("syn1Status", synonym_en_production.exists() ? 1 : 0);
|
||||
|
||||
// check status again
|
||||
boolean keepPlacesTagging = false;
|
||||
for (final LibraryProvider.Dictionary dictionary: LibraryProvider.Dictionary.values()) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user