remove duplicate words
This commit is contained in:
parent
26647ad351
commit
595a70e40c
@ -23,6 +23,8 @@ def main(args):
|
|||||||
words = [ word[0] for word in words if word[1] > args.frequency_min and word[0].isalpha() and len(word[0]) == args.word_length ]
|
words = [ word[0] for word in words if word[1] > args.frequency_min and word[0].isalpha() and len(word[0]) == args.word_length ]
|
||||||
|
|
||||||
words.sort(key=lambda word: word[1])
|
words.sort(key=lambda word: word[1])
|
||||||
|
# remove duplicates
|
||||||
|
words = list(set(words))
|
||||||
print(f"wordlist = {json.dumps(words)}")
|
print(f"wordlist = {json.dumps(words)}")
|
||||||
print(f"{args}", file=sys.stderr)
|
print(f"{args}", file=sys.stderr)
|
||||||
print(f"{len(words)=}", file=sys.stderr)
|
print(f"{len(words)=}", file=sys.stderr)
|
||||||
|
Loading…
Reference in New Issue
Block a user