From 332e382c45014b6b04ccf810a1a144d2505d58c9 Mon Sep 17 00:00:00 2001 From: Adrian Smith Date: Thu, 7 Jul 2011 21:03:46 +0100 Subject: [PATCH 1/2] test parse.py --- .gitignore | 1 + parse.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .gitignore mode change 100644 => 100755 parse.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0d20b64 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.pyc diff --git a/parse.py b/parse.py old mode 100644 new mode 100755 index 504456f..b67b5ac --- a/parse.py +++ b/parse.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python import nltk def get_parts(text): @@ -12,5 +13,5 @@ def get_parts(text): return dic if __name__ == '__main__': - get_parts("hi how are you") + print get_parts(sys.argv[1]) From e08e6e88108d5c918cb220d0ece03c462993c6ac Mon Sep 17 00:00:00 2001 From: Adrian Smith Date: Thu, 7 Jul 2011 21:10:28 +0100 Subject: [PATCH 2/2] import sys --- parse.py | 1 + 1 file changed, 1 insertion(+) diff --git a/parse.py b/parse.py index 09c322f..adb9506 100755 --- a/parse.py +++ b/parse.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +import sys import nltk def get_parts(text):