From 3228cf5e125b2de9f06f993df8bbb9a6d66ee548 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Tue, 11 Oct 2016 21:50:30 -0400 Subject: [PATCH] Add state abbreviations Only some work since there are arpabet entries. I don't care to override them at this time. --- TODO.md | 6 +++- config.toml | 2 +- dictionary/IMPROVE.md | 2 ++ dictionary/abbreviations.dict | 56 +++++++++++++++++++++++++++++++++++ dictionary/cmudict-0.7b | 10 ++++--- 5 files changed, 70 insertions(+), 6 deletions(-) diff --git a/TODO.md b/TODO.md index 00bd8dbd1a..37a70c3008 100644 --- a/TODO.md +++ b/TODO.md @@ -2,6 +2,7 @@ Remaining Tasks =============== Tokenizing + - Plurals - Ordinals (1st, 25th, ...) - Times (9 p.m. ET) - Hyphenated words @@ -10,7 +11,6 @@ Tokenizing Parsing - (Everything in tokenizing) - - Numbers - Dates - Twitter hashtags, usernames - CamelCase parsing @@ -36,3 +36,7 @@ Monetization - Contact other developers? - PhoneGap? (Blah) +Parsing Examples +---------------- +- Camel case even outside of hashtags: "Google acquires FameBit" +- Time: 5:30ET diff --git a/config.toml b/config.toml index e9b8d80b37..963f7f3902 100644 --- a/config.toml +++ b/config.toml @@ -21,5 +21,5 @@ # Logging verbosity log_handler = false log_parsing = true - log_synthesis = false + log_synthesis = true diff --git a/dictionary/IMPROVE.md b/dictionary/IMPROVE.md index 3c12e42ecd..523173a6e2 100644 --- a/dictionary/IMPROVE.md +++ b/dictionary/IMPROVE.md @@ -93,12 +93,14 @@ sack self shiny shovel +shut software sometime sometimes such sudanese ten +the there (sounds like they're) universe unwilling diff --git a/dictionary/abbreviations.dict b/dictionary/abbreviations.dict index f2a2f79506..f32f89deb9 100644 --- a/dictionary/abbreviations.dict +++ b/dictionary/abbreviations.dict @@ -6,3 +6,59 @@ OMFG oh my fucking god OMG oh my god RT retweet WTF what the fuck +BRB be right back + +; States +; Some of these are commented out as they may interfere with words +; that are more common than the state abbreviation. +; AL Alabama +; CO Colorado +; DC District of Columbia +; DE Delaware +; HI Hawaii +; ID Idaho +; IN Indiana +; LA Louisiana +; MA Massachusetts +; ME Maine +; MI Michigan +; MO Missouri +; MS Mississippi +; MT Montana +; OH Ohio +; OK Oklahoma +; OR Oregon +; PA Pennsylvania +; SD South Dakota +AK Alaska +AR Arkansas +AZ Arizona +CA California +CT Connecticut +FL Florida +GA Georgia +IA Iowa +IL Illinois +KS Kansas +KY Kentucky +MD Maryland +MN Minnesota +NC North Carolina +ND North Dakota +NE Nebraska +NH New Hampshire +NJ New Jersey +NM New Mexico +NV Nevada +NY New York +RI Rhode Island +SC South Carolina +TN Tennessee +TX Texas +UT Utah +VA Virginia +VT Vermont +WA Washington +WI Wisconsin +WV West Virginia +WY Wyoming diff --git a/dictionary/cmudict-0.7b b/dictionary/cmudict-0.7b index 9fa2c23862..0986889660 100644 --- a/dictionary/cmudict-0.7b +++ b/dictionary/cmudict-0.7b @@ -17060,9 +17060,10 @@ C2 S IY1 T UW1 C3 S IY1 TH R IY1 C4 S IY1 F AO1 R C5 S IY1 F AY1 V -CA K AH1 -CA(1) S IY1 EY1 -CA(2) K AA1 +; "california" is more appropriate here, +; CA K AH1 +; CA(1) S IY1 EY1 +; CA(2) K AA1 CAAN K AA1 N CAB K AE1 B CAB'S K AE1 B Z @@ -132107,7 +132108,8 @@ WUTTKE W AH1 T K IY0 WUXI W AH1 K S IY0 WUYDA W OY1 D AH0 WUZZY W UH1 Z IY0 -WY W EY1 +; Wyoming is more appropriate, +; WY W EY1 WYAN W AY1 AH0 N WYAND W AY1 AH0 N D WYANT W AY1 AH0 N T