new-words
diff new-words-py.sh @ 49:00286f6bfa85
experimental: when -c specified, use dictionary for compression
author | Igor Chubin <igor@chub.in> |
---|---|
date | Wed Feb 09 21:08:23 2011 +0200 (2011-02-09) |
parents | d708e2c1bad8 |
children | 4e931db74618 |
line diff
1.1 --- a/new-words-py.sh Mon Feb 07 21:21:17 2011 +0200 1.2 +++ b/new-words-py.sh Wed Feb 09 21:08:23 2011 +0200 1.3 @@ -25,7 +25,9 @@ 1.4 -T show list of active tags 1.5 -m tag merge the words tagged with "tag" into the main vocabulary 1.6 -M merge the words tagged with any tag into the main vocabulary 1.7 - -r tag remove subvocabulary for the "tag" 1.8 + -d tag delete subvocabulary for the "tag" 1.9 + -r RANGE show only first RANGE words 1.10 + -R RANGE show only words lower than RANGE percent 1.11 -2 -3 find 2 and 3 words' sequences 1.12 1.13 The language of the text can be specified also 1.14 @@ -84,7 +86,7 @@ 1.15 SHOW_VOC_STAT=NO 1.16 COMPRESSED_WORDLIST=NO 1.17 WORDS_GROUPING=YES 1.18 -while getopts Gcl:sSkanNp:t:Tm:Mr:23 opt 1.19 +while getopts Gcl:sSkanNp:t:Tm:Md:r:R:23 opt 1.20 do 1.21 case "$opt" in 1.22 c) COMPRESSED_WORDLIST=YES;; 1.23 @@ -101,7 +103,9 @@ 1.24 T) TAGS_LIST_ONLY="YES";; 1.25 m) DONT_ADD_MARKLINES="YES"; MERGE_TAGGED_WORDS="YES"; MERGE_THIS_TAGS="$TAG_NAME $OPTARG";; 1.26 M) DONT_ADD_MARKLINES="YES"; MERGE_ALL_TAGGED="YES";; 1.27 - r) REMOVE_TAG="YES"; TAG_NAME="$TAG_NAME $OPTARG";; 1.28 + d) REMOVE_TAG="YES"; TAG_NAME="$TAG_NAME $OPTARG";; 1.29 + r) SHOW_RANGE="$OPTARG";; 1.30 + R) SHOW_RANGE_PERCENTAGE="$OPTARG";; 1.31 2) GROUP_WORDS_BY_TWO=YES;; 1.32 3) GROUP_WORDS_BY_THREE=YES;; 1.33 \?) # unknown flag 1.34 @@ -141,6 +145,8 @@ 1.35 } 1.36 get_words_group_words_add_stat() 1.37 { 1.38 + SHOW_RANGE="$SHOW_RANGE" \ 1.39 + SHOW_RANGE_PERCENTAGE="$SHOW_RANGE_PERCENTAGE" \ 1.40 COMPRESSED_WORDLIST="$COMPRESSED_WORDLIST" \ 1.41 GROUP_WORDS_BY_TWO="$GROUP_WORDS_BY_TWO" \ 1.42 GROUP_WORDS_BY_THREE="$GROUP_WORDS_BY_THREE" \