# HG changeset patch # User Igor Chubin # Date 1321103000 -3600 # Node ID 1b8b30ad7c9565482e31b8a383de5cfebc31fdb7 # Parent 3a61988109a8464da01436d1888492d19542c5e6 vocabulary filename option diff -r 3a61988109a8 -r 1b8b30ad7c95 new-words.py --- a/new-words.py Fri Nov 04 20:50:49 2011 +0100 +++ b/new-words.py Sat Nov 12 14:03:20 2011 +0100 @@ -29,6 +29,7 @@ def __init__(self, language, linked_words={}): stemmer_algorithm = { 'de' : 'german', + 'fr' : 'french', 'en' : 'english', 'es' : 'spanish', 'ru' : 'russian', @@ -232,6 +233,12 @@ dest="show_tags") parser.add_option( + "-v", "--vocabulary-filename", + help="use specified file as a vocabulary", + action="store", + dest="vocabulary_filename") + +parser.add_option( "-2", "--two-words", help="find 2 words' sequences", action="store_true", @@ -297,6 +304,8 @@ return result def voc_filename(): + if 'vocabulary_filename' in config: + return config['vocabulary_filename'] return "%s/%s.txt"%(config['config_directory'], config['language']) def load_vocabulary():