commonsense 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/commonsense/basic_english.rb +91 -3
- data/lib/commonsense/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 379a325eb31db4c69673a80f72474691bec9edfe
|
4
|
+
data.tar.gz: 9e5fa15917df93eb18c943ea3b2fb6d7b84ff4dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2fe2ee73ae99cebab1d00cef055cfb712cd47b57185e1449091643f65189667103697850f20a6e1369462f3297a01aa1b63c7a2cf05c21f634cf564801da489
|
7
|
+
data.tar.gz: e7367d08766d09c3e9d1ef5527337f189be7cecb65fdba81cc2406be0b1aebf61dbee52d7583b458c1e8c3e5d8b7017dde3d77aad3b75dd79cf4f0e4ca32c3e0
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Commonsense
|
2
2
|
module BasicEnglish
|
3
|
-
|
3
|
+
BASIC_WORDS = [
|
4
4
|
'come',
|
5
5
|
'get',
|
6
6
|
'give',
|
@@ -311,7 +311,7 @@ module Commonsense
|
|
311
311
|
'money',
|
312
312
|
'month',
|
313
313
|
'morning',
|
314
|
-
'
|
314
|
+
'mother',
|
315
315
|
'motion',
|
316
316
|
'mountain',
|
317
317
|
'move',
|
@@ -853,6 +853,94 @@ module Commonsense
|
|
853
853
|
'wrong'
|
854
854
|
]
|
855
855
|
|
856
|
+
##
|
857
|
+
# The following is a manual attempt at listing simple pronouns not already in the above list.
|
858
|
+
#
|
859
|
+
|
860
|
+
PRONOUNS = [
|
861
|
+
'she',
|
862
|
+
'it',
|
863
|
+
'we',
|
864
|
+
'they'
|
865
|
+
]
|
866
|
+
|
867
|
+
##
|
868
|
+
# The following is a manual attempt at listing simple conjugations of the verbs above.
|
869
|
+
#
|
870
|
+
# The present tense indicative forms of each verb are included, along with special cases 'was' and 'were'.
|
871
|
+
#
|
872
|
+
|
873
|
+
CONJUGATIONS = [
|
874
|
+
# come
|
875
|
+
'comes',
|
876
|
+
'came',
|
877
|
+
|
878
|
+
# get
|
879
|
+
'gets',
|
880
|
+
'got',
|
881
|
+
|
882
|
+
# give
|
883
|
+
'gives',
|
884
|
+
'gave',
|
885
|
+
'given',
|
886
|
+
|
887
|
+
# go
|
888
|
+
'goes',
|
889
|
+
'gone',
|
890
|
+
|
891
|
+
# keep
|
892
|
+
'keeps',
|
893
|
+
'kept',
|
894
|
+
|
895
|
+
# let
|
896
|
+
'lets',
|
897
|
+
|
898
|
+
# make
|
899
|
+
'makes',
|
900
|
+
'made',
|
901
|
+
|
902
|
+
# put
|
903
|
+
'puts',
|
904
|
+
|
905
|
+
# seem
|
906
|
+
'seems',
|
907
|
+
'seemed',
|
908
|
+
|
909
|
+
# take
|
910
|
+
'takes',
|
911
|
+
'took',
|
912
|
+
|
913
|
+
# be
|
914
|
+
'am',
|
915
|
+
'are',
|
916
|
+
'is',
|
917
|
+
'was',
|
918
|
+
'were',
|
919
|
+
|
920
|
+
# do
|
921
|
+
'does',
|
922
|
+
'done',
|
923
|
+
|
924
|
+
# say
|
925
|
+
'says',
|
926
|
+
'said',
|
927
|
+
|
928
|
+
# see
|
929
|
+
'sees',
|
930
|
+
'saw',
|
931
|
+
|
932
|
+
# send
|
933
|
+
'sends',
|
934
|
+
'sent'
|
935
|
+
]
|
936
|
+
|
937
|
+
##
|
938
|
+
# Basic words and conjugations thereof.
|
939
|
+
|
940
|
+
def self.words
|
941
|
+
BASIC_WORDS + PRONOUNS + CONJUGATIONS
|
942
|
+
end
|
943
|
+
|
856
944
|
##
|
857
945
|
# Tests whether a word is included in our version of Ogden's Basic English word list,
|
858
946
|
# and therefore suitable as, e.g. a mid-sentence word.
|
@@ -862,7 +950,7 @@ module Commonsense
|
|
862
950
|
# +word+ should be a case-sensitive string.
|
863
951
|
|
864
952
|
def self.valid?(word)
|
865
|
-
|
953
|
+
words.include? word
|
866
954
|
end
|
867
955
|
|
868
956
|
##
|
data/lib/commonsense/version.rb
CHANGED