te_rex 0.0.4 → 0.0.5

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: 0a89389faff81b10c963d6469dfb52e514387813
4
- data.tar.gz: 443a437ac01c887945eb14af4cc36aee5257977e
3
+ metadata.gz: 17bee1b2969c5ea0885ee13cab910a660315c186
4
+ data.tar.gz: d68c27c7666231c8e1d3431a495d3f6f93b9a32d
5
5
  SHA512:
6
- metadata.gz: a03cd6e851150d5d9fdfced7942b1b7d9e0d20f47c08d5ac81edbd10337568c148b072a41f40b5615c2610d52535a1c6045874cac4c3baee90c18abe58143647
7
- data.tar.gz: 2efe3da36bb2981b519ef4d5310915f7cb0906f1481a27dca3ab041a2847de0354feca7ec60f9404a5f6837ae0561b4f41b7e3454d892971ba39a64cc0030b86
6
+ metadata.gz: e7f412936cb643c27057eb2ba8f3f4c480e293ffa816f4f4d1724957d0a39710cc977e5e6076fdf0f3ea96cb29c19b99a88f873eafc5ebd5ecacdaa259c2eaf2
7
+ data.tar.gz: 440189ed0d1f93b98f6cd0121642b71c5013f71ae9804e10d4d4fdb455732e48c2448c9931c76fd019ad6e544fc49babdf2f2e40950cc431bcf64b33f12c7e41
@@ -17,7 +17,7 @@ module TeRex
17
17
 
18
18
  # Replace date times with TERM (09MAR04, 02-23-14, 2014/03/05)
19
19
  def date_time(s)
20
- s.gsub(/(^\d+)|(\s\d+(AM|PM))|(\d{2}\w{3}\d{2})|(\d{2}\:\d{2})|(\d{2,4}\-\d{2,4}-\d{2,4})|(\d{1,3}\/\d{2,4}\/\d{2,4})|(\d+\:\d+)/, 'datetime')
20
+ s.gsub(/(^\d+)|(\s\d+(AM|PM))|(\d{2}\w{3}\d{2})|(\d{2}\:\d{2})|(\d{2,4}\-\d{2,4}-\d{2,4})|(\d{1,4}\/\d{2,4}\/\d{2,4})|(\d+\:\d+)/, 'datetime')
21
21
  end
22
22
 
23
23
  # Replace money types with TERM ($60, 120.00, $423.89)
@@ -1,3 +1,3 @@
1
1
  module TeRex
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -17,7 +17,7 @@ class BayesDataTest < MicroTest::Test
17
17
 
18
18
  test "datetime is removed and replaced" do
19
19
  s1 = "This $140 will be paid on 09/14/2014"
20
- s2 = "I get $20.00 on 2014-05-21 and on 09MAR04"
20
+ s2 = "At on 2015/09/08 get $20.00 on 2014-05-21 and on 09MAR04"
21
21
  s3 = "I'll pay you $60.21 on 06-20-2014"
22
22
 
23
23
  s11 = TeRex::Classifier::BayesData.date_time(s1)
@@ -25,7 +25,7 @@ class BayesDataTest < MicroTest::Test
25
25
  s33 = TeRex::Classifier::BayesData.date_time(s3)
26
26
 
27
27
  assert s11 == "This $140 will be paid on datetime"
28
- assert s22 == "I get $20.00 on datetime and on datetime"
28
+ assert s22 == "At on datetime get $20.00 on datetime and on datetime"
29
29
  assert s33 == "I'll pay you $60.21 on datetime"
30
30
  end
31
31
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: te_rex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Bowles