summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2017-11-28 20:17:36 +0100
committerPatrick Simianer <p@simianer.de>2017-11-28 20:17:36 +0100
commit00977dd98588261a04b9a7f55c8d9ab3a791d887 (patch)
tree2ded5ab54ff2c52865a2ed0c6c8345460b72c38e
parentd946f0172e1c2524f539339a5c793609d26e3e74 (diff)
vocab2
-rwxr-xr-xvocab213
1 files changed, 13 insertions, 0 deletions
diff --git a/vocab2 b/vocab2
new file mode 100755
index 0000000..1991357
--- /dev/null
+++ b/vocab2
@@ -0,0 +1,13 @@
+#!/usr/bin/env ruby
+
+require 'zipf'
+
+d = {}
+while line = STDIN.gets
+ line.strip.split.each { |tok|
+ d[tok] = true
+ }
+end
+
+puts d.size
+