pragmatic_segmenter 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +10 -0
- data/Gemfile +1 -1
- data/README.md +4 -3
- data/Rakefile +1 -0
- data/lib/pragmatic_segmenter/version.rb +1 -1
- data/pragmatic_segmenter.gemspec +0 -1
- data/spec/spec_helper.rb +3 -0
- metadata +2 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a3193df3b8ca130acd3ce35c73cc1e6f33ec4c1
|
4
|
+
data.tar.gz: d309a5c69fe5abe4cc06a4d97e58191b391a8e88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c830d570cbc5d4cb36f93385d8a1e29da2101cf8831c4c3ce217bf079ea6c1990d059c246e3a13862109f71a2b4ddbbc5bf078308a43f91cc610ada7aaf10264
|
7
|
+
data.tar.gz: 94ae13f93099f6fd5923e60a315313bac7122f5ca3b6536992f3fcd20352cdfd19fdf227e74a37a2483146861cfd6ed5c92396c008fd4413e142633f4cfad715
|
data/.travis.yml
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
- "2.1.5"
|
4
|
+
- "2.2.0"
|
5
|
+
# uncomment this line if your project needs to run something other than `rake`:
|
6
|
+
# script: bundle exec rspec spec
|
7
|
+
addons:
|
8
|
+
code_climate:
|
9
|
+
repo_token:
|
10
|
+
secure: "TDtg1SY+50yvYL8nRhf3YG2xtyS4b7wdJddGL7BRvYHkn5jhmGAXRU9F9+IRyPLPlwwd/VX2zxClmU4hr3DAbb7C/JUscNmVUcDeiwlMOIEUIjKXT+f+TFkLLjTsXjivdX7T9oD/pzHUHB5SjqWfWyZKIo2uAiTv6zt4PYvoeUQ="
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,12 +1,13 @@
|
|
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)
|
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) [![Build Status](https://travis-ci.org/diasks2/pragmatic_segmenter.png)](https://travis-ci.org/diasks2/pragmatic_segmenter) [![Test Coverage](https://codeclimate.com/github/diasks2/pragmatic_segmenter/badges/coverage.svg)](https://codeclimate.com/github/diasks2/pragmatic_segmenter)
|
4
4
|
|
5
5
|
Pragmatic Segmenter is a rule-based sentence boundary detection gem that works out-of-the-box across many languages.
|
6
6
|
|
7
7
|
##Install
|
8
8
|
|
9
9
|
**Ruby**
|
10
|
+
*Supports Ruby 2.1.5 and above*
|
10
11
|
```
|
11
12
|
gem install pragmatic_segmenter
|
12
13
|
```
|
@@ -23,10 +24,10 @@ gem 'pragmatic_segmenter'
|
|
23
24
|
* To specify a language use its two-digit [ISO 639-1 code](https://www.tm-town.com/languages).
|
24
25
|
|
25
26
|
```ruby
|
26
|
-
text = "Hello world. My name is Mr. Smith. I work for the U.S. Government and I live in the U.S."
|
27
|
+
text = "Hello world. My name is Mr. Smith. I work for the U.S. Government and I live in the U.S. I live in New York."
|
27
28
|
ps = PragmaticSegmenter::Segmenter.new(text: text)
|
28
29
|
ps.segment
|
29
|
-
# => ["Hello world.", "My name is Mr. Smith.", "I work for the U.S. Government and I live in the U.S."]
|
30
|
+
# => ["Hello world.", "My name is Mr. Smith.", "I work for the U.S. Government and I live in the U.S.", "I live in New York."]
|
30
31
|
|
31
32
|
# Specify a language
|
32
33
|
text = "Այսօր երկուշաբթի է: Ես գնում եմ աշխատանքի:"
|
data/Rakefile
CHANGED
data/pragmatic_segmenter.gemspec
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pragmatic_segmenter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin S. Dias
|
@@ -52,20 +52,6 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rubocop
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
55
|
description: 'Pragmatic Segmenter is a sentence segmentation tool for Ruby. It allows
|
70
56
|
you to split a text into an array of sentences. This gem provides 2 main benefits
|
71
57
|
over other segmentation gems - 1) It works well even with ill-formatted text 2)
|
@@ -78,6 +64,7 @@ extra_rdoc_files: []
|
|
78
64
|
files:
|
79
65
|
- ".gitignore"
|
80
66
|
- ".rspec"
|
67
|
+
- ".travis.yml"
|
81
68
|
- Gemfile
|
82
69
|
- LICENSE.txt
|
83
70
|
- README.md
|