pragmatic_segmenter 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/pragmatic_segmenter/languages/english.rb +0 -18
- data/lib/pragmatic_segmenter/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: 94a3de7046fcfb4805b10e2f558febc504afa123
|
4
|
+
data.tar.gz: 1e90330a75ce3eb71a2bc8174d8d44807c0c68aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a61dc5a7f27eac0226b6a47fa0f0a7b88d5b8cedc882fedd26d62718f81bedddb4e2b83542c217bd5be8cb45a00f4150e328292b9d32ee2e7aef2f6fd67132a0
|
7
|
+
data.tar.gz: a24e489cb5ae26ea3973ec7ae101d5d73db4c6a9579d4c951d07f4f9444ad1acb97c78f84d5b93815b964462f0b78980c42e287aeb2a35d2d654b7e23aa51554
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
#Pragmatic Segmenter
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/pragmatic_segmenter.svg)](http://badge.fury.io/rb/pragmatic_segmenter) [![Code Climate](https://codeclimate.com/github/diasks2/pragmatic_segmenter/badges/gpa.svg)](https://codeclimate.com/github/diasks2/pragmatic_segmenter)
|
4
|
+
|
3
5
|
Pragmatic Segmenter is a rule-based sentence boundary detection gem that works out-of-the-box across many languages.
|
4
6
|
|
5
7
|
##Install
|
@@ -1,24 +1,6 @@
|
|
1
1
|
module PragmaticSegmenter
|
2
2
|
module Languages
|
3
3
|
class English
|
4
|
-
class Abbreviation < PragmaticSegmenter::Abbreviation
|
5
|
-
ABBREVIATIONS = ['adj', 'adm', 'adv', 'al', 'ala', 'alta', 'apr', 'arc', 'ariz', 'ark', 'art', 'assn', 'asst', 'attys', 'aug', 'ave', 'bart', 'bld', 'bldg', 'blvd', 'brig', 'bros', 'cal', 'calif', 'capt', 'cl', 'cmdr', 'co', 'col', 'colo', 'comdr', 'con', 'conn', 'corp', 'cpl', 'cres', 'ct', 'd.phil', 'dak', 'dec', 'del', 'dept', 'det', 'dist', 'dr', 'dr.phil', 'dr.philos', 'drs', 'e.g', 'ens', 'esp', 'esq', 'etc', 'exp', 'expy', 'ext', 'feb', 'fed', 'fla', 'ft', 'fwy', 'fy', 'ga', 'gen', 'gov', 'hon', 'hosp', 'hr', 'hway', 'hwy', 'i.e', 'ia', 'id', 'ida', 'ill', 'inc', 'ind', 'ing', 'insp', 'is', 'jan', 'jr', 'jul', 'jun', 'kan', 'kans', 'ken', 'ky', 'la', 'lt', 'ltd', 'maj', 'man', 'mar', 'mass', 'may', 'md', 'me', 'messrs', 'mex', 'mfg', 'mich', 'min', 'minn', 'miss', 'mlle', 'mm', 'mme', 'mo', 'mont', 'mr', 'mrs', 'ms', 'msgr', 'mssrs', 'mt', 'mtn', 'neb', 'nebr', 'nev', 'no', 'nos', 'nov', 'nr', 'oct', 'ok', 'okla', 'ont', 'op', 'ord', 'ore', 'p', 'pa', 'pd', 'pde', 'penn', 'penna', 'pfc', 'ph', 'ph.d', 'pl', 'plz', 'pp', 'prof', 'pvt', 'que', 'rd', 'ref', 'rep', 'reps', 'res', 'rev', 'rt', 'sask', 'sen', 'sens', 'sep', 'sept', 'sfc', 'sgt', 'sr', 'st', 'supt', 'surg', 'tce', 'tenn', 'tex', 'univ', 'usafa', 'u.s', 'ut', 'va', 'v', 'ver', 'vs', 'vt', 'wash', 'wis', 'wisc', 'wy', 'wyo', 'yuk']
|
6
|
-
PREPOSITIVE_ABBREVIATIONS = ['adm', 'attys', 'brig', 'capt', 'cmdr', 'col', 'cpl', 'det', 'dr', 'gen', 'gov', 'ing', 'lt', 'maj', 'mr', 'mrs', 'ms', 'mt', 'messrs', 'mssrs', 'prof', 'rep', 'reps', 'rev', 'sen', 'sens', 'sgt', 'st', 'supt', 'v', 'vs']
|
7
|
-
NUMBER_ABBREVIATIONS = ['art', 'ext', 'no', 'nos', 'p', 'pp']
|
8
|
-
|
9
|
-
def all
|
10
|
-
ABBREVIATIONS
|
11
|
-
end
|
12
|
-
|
13
|
-
def prepositive
|
14
|
-
PREPOSITIVE_ABBREVIATIONS
|
15
|
-
end
|
16
|
-
|
17
|
-
def number
|
18
|
-
NUMBER_ABBREVIATIONS
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
4
|
class Cleaner < PragmaticSegmenter::Cleaner
|
23
5
|
def clean
|
24
6
|
super
|