new-words

view new-words.py @ 37:be6336e98b3c

new-words.py started
author igor@chub.in
date Fri Jan 21 15:59:45 2011 +0200 (2011-01-21)
parents
children adbc809d3924
line source
1 #!/usr/bin/env python
3 import optparse
5 parser = optparse.OptionParser()
7 parser.add_option(
8 "-a", "--no-marks",
9 help="don't add marks (and don't save marks added by user)",
10 action="store_true",
11 dest="no_marks")
13 parser.add_option(
14 "-c", "--compressed",
15 help="show compressed wordlist: one word per group",
16 action="store_true",
17 dest="compressed")
19 parser.add_option(
20 "-k", "--known-words",
21 help="put higher words that are similar to the known words (only for English)",
22 action="store_true",
23 dest="compressed")
25 parser.add_option(
26 "-l", "--language",
27 help="specify language of text",
28 action="store",
29 dest="language")
31 parser.add_option(
32 "-m", "--merge-tag",
33 help="merge words tagged with specified tag into the main vocabulary",
34 action="store",
35 dest="merge_tag")
37 parser.add_option(
38 "-M", "--merge-tagged",
39 help="merge words tagged with ANY tag into the main vocabulary",
40 action="store_true",
41 dest="merge_tagged")
43 parser.add_option(
44 "-n", "--non-interactive",
45 help="non-interactive mode (don't run vi)",
46 action="store_true",
47 dest="non_interactive")
49 parser.add_option(
50 "-N", "--no-filter",
51 help="switch off known words filtering",
52 action="store_true",
53 dest="no_filter")
55 parser.add_option(
56 "-p", "--pages",
57 help="work with specified pages only (pages = start-stop/total )",
58 action="store",
59 dest="pages")
61 parser.add_option(
62 "-r", "--remove-tag",
63 help="remove subvocabulary of specified tag",
64 action="store",
65 dest="remove_tag")
67 parser.add_option(
68 "-s", "--text-stats",
69 help="show the text statistics (percentage of known words and so on) and exit",
70 action="store_true",
71 dest="text_stats")
73 parser.add_option(
74 "-S", "--voc-stats",
75 help="show your vocabulary statistics (number of words and word groups)",
76 action="store_true",
77 dest="voc_stats")
79 parser.add_option(
80 "-t", "--tag",
81 help="tag known words with tag",
82 action="store",
83 dest="tag")
85 parser.add_option(
86 "-T", "--show-tags",
87 help="tag known words with tag",
88 action="store_true",
89 dest="show_tags")
91 parser.add_option(
92 "-2", "--two-words",
93 help="find 2 words' sequences",
94 action="store_true",
95 dest="two_words")
97 parser.add_option(
98 "-3", "--three-words",
99 help="find 3 words' sequences",
100 action="store_true",
101 dest="three_words")
103 (options, args) = parser.parse_args()
105 def get_words():
106 pass
108 def add_stat():
109 pass
111 def two_and_three_words():
112 pass
114 def grep_v_english():
115 pass
117 def group_words():
118 pass
120 def add_marks():
121 pass
123 def remove_marks():
124 pass
126 def text_from_url():
127 pass
129 def part():
130 pass