mitie 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +3 -6
- data/lib/mitie.rb +6 -4
- data/lib/mitie/ner.rb +2 -0
- data/lib/mitie/version.rb +1 -1
- data/vendor/LICENSE.txt +23 -0
- data/vendor/libmitie.dylib +0 -0
- data/vendor/libmitie.so +0 -0
- data/vendor/mitie.dll +0 -0
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66bb5dce2b079310bd5da7da44a5836331f05bfbbb746163dc45d49094d24e58
|
4
|
+
data.tar.gz: a1e1ec8d23c639315f36f4e0e5e5ddfc0a08e1922fd0d774e302914f5974ab83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1914841e9c1fef8ac20c007595b8ed56def925710a75e4e74959496dfa9095a7e253212b560035df9c1c5138443b835a3fffe2cf7c5cf3a9a81135a62df6926
|
7
|
+
data.tar.gz: 397f5d45ca142b3d86fa44c65382fa57a64d9a6ea66ee51b6735d4ae5645cc5c01a4a99744b5fc565cea16d1616e251c9bfca2662b6aa1492d2dcf093a19f57e
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -2,13 +2,9 @@
|
|
2
2
|
|
3
3
|
[MITIE](https://github.com/mit-nlp/MITIE) - named-entity recognition - for Ruby
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
First, install MITIE. For Homebrew, use:
|
5
|
+
[![Build Status](https://travis-ci.org/ankane/mitie.svg?branch=master)](https://travis-ci.org/ankane/mitie) [![Build status](https://ci.appveyor.com/api/projects/status/stc89tc57xfva451/branch/master?svg=true)](https://ci.appveyor.com/project/ankane/mitie/branch/master)
|
8
6
|
|
9
|
-
|
10
|
-
brew install mitie
|
11
|
-
```
|
7
|
+
## Installation
|
12
8
|
|
13
9
|
Add this line to your application’s Gemfile:
|
14
10
|
|
@@ -89,5 +85,6 @@ To get started with development:
|
|
89
85
|
git clone https://github.com/ankane/mitie.git
|
90
86
|
cd mitie
|
91
87
|
bundle install
|
88
|
+
bundle exec rake vendor:all
|
92
89
|
MITIE_NER_PATH=path/to/ner_model.dat bundle exec rake test
|
93
90
|
```
|
data/lib/mitie.rb
CHANGED
@@ -11,14 +11,16 @@ module Mitie
|
|
11
11
|
class << self
|
12
12
|
attr_accessor :ffi_lib
|
13
13
|
end
|
14
|
-
|
14
|
+
lib_name =
|
15
15
|
if Gem.win_platform?
|
16
|
-
|
16
|
+
"mitie.dll"
|
17
17
|
elsif RbConfig::CONFIG["host_os"] =~ /darwin/i
|
18
|
-
|
18
|
+
"libmitie.dylib"
|
19
19
|
else
|
20
|
-
|
20
|
+
"libmitie.so"
|
21
21
|
end
|
22
|
+
vendor_lib = File.expand_path("../vendor/#{lib_name}", __dir__)
|
23
|
+
self.ffi_lib = [vendor_lib]
|
22
24
|
|
23
25
|
# friendlier error message
|
24
26
|
autoload :FFI, "mitie/ffi"
|
data/lib/mitie/ner.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
module Mitie
|
2
2
|
class NER
|
3
3
|
def initialize(path)
|
4
|
+
# better error message
|
5
|
+
raise ArgumentError, "Model file does not exist" unless File.exist?(path)
|
4
6
|
@pointer = FFI.mitie_load_named_entity_extractor(path)
|
5
7
|
ObjectSpace.define_finalizer(self, self.class.finalize(pointer))
|
6
8
|
end
|
data/lib/mitie/version.rb
CHANGED
data/vendor/LICENSE.txt
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
Boost Software License - Version 1.0 - August 17th, 2003
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person or organization
|
4
|
+
obtaining a copy of the software and accompanying documentation covered by
|
5
|
+
this license (the "Software") to use, reproduce, display, distribute,
|
6
|
+
execute, and transmit the Software, and to prepare derivative works of the
|
7
|
+
Software, and to permit third-parties to whom the Software is furnished to
|
8
|
+
do so, all subject to the following:
|
9
|
+
|
10
|
+
The copyright notices in the Software and this entire statement, including
|
11
|
+
the above license grant, this restriction and the following disclaimer,
|
12
|
+
must be included in all copies of the Software, in whole or in part, and
|
13
|
+
all derivative works of the Software, unless such copies or derivative
|
14
|
+
works are solely in the form of machine-executable object code generated by
|
15
|
+
a source language processor.
|
16
|
+
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
20
|
+
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
21
|
+
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
22
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
23
|
+
DEALINGS IN THE SOFTWARE.
|
Binary file
|
data/vendor/libmitie.so
ADDED
Binary file
|
data/vendor/mitie.dll
ADDED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mitie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
@@ -65,6 +65,10 @@ files:
|
|
65
65
|
- lib/mitie/ffi.rb
|
66
66
|
- lib/mitie/ner.rb
|
67
67
|
- lib/mitie/version.rb
|
68
|
+
- vendor/LICENSE.txt
|
69
|
+
- vendor/libmitie.dylib
|
70
|
+
- vendor/libmitie.so
|
71
|
+
- vendor/mitie.dll
|
68
72
|
homepage: https://github.com/ankane/mitie
|
69
73
|
licenses:
|
70
74
|
- BSL-1.0
|