commonsense 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ad6558a54e57bd14413dc62bc3dd97625f6c7432
4
- data.tar.gz: 5aad627b19f1b2038413e5a74dbc87d17a43ae90
3
+ metadata.gz: 379a325eb31db4c69673a80f72474691bec9edfe
4
+ data.tar.gz: 9e5fa15917df93eb18c943ea3b2fb6d7b84ff4dd
5
5
  SHA512:
6
- metadata.gz: 247da0f12a74311fee837001bec99733b39c5c5835513a5469995458237b299135dafa279dedcdb8b2b9d1dfb8fd8146da44e6105e000deda3eedf8910284c33
7
- data.tar.gz: a8de0108008c7c44d97dd6f961748b623dea368ca058a44adf0ffbca76816ddaef2ba69c2f68faa0b21b92c4c217625411fe2b68c04fa9b8077b073652364b46
6
+ metadata.gz: d2fe2ee73ae99cebab1d00cef055cfb712cd47b57185e1449091643f65189667103697850f20a6e1369462f3297a01aa1b63c7a2cf05c21f634cf564801da489
7
+ data.tar.gz: e7367d08766d09c3e9d1ef5527337f189be7cecb65fdba81cc2406be0b1aebf61dbee52d7583b458c1e8c3e5d8b7017dde3d77aad3b75dd79cf4f0e4ca32c3e0
data/README.md CHANGED
@@ -17,7 +17,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
17
17
 
18
18
  ## Todo
19
19
 
20
- + allow verb conjugates
20
+ + ~~allow verb conjugates~~
21
21
  + add feature to publish to anonymous pastebins
22
22
 
23
23
  ## Contributing
@@ -1,6 +1,6 @@
1
1
  module Commonsense
2
2
  module BasicEnglish
3
- WORDS = [
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
- 'other',
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
- WORDS.include? word
953
+ words.include? word
866
954
  end
867
955
 
868
956
  ##
@@ -1,3 +1,3 @@
1
1
  module Commonsense
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commonsense
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Eills