new-words

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