opener-pos-tagger-base 2.2.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 42cc83dac3cd626f8b0411a4fd1a30d359f9a824
4
- data.tar.gz: e59707a4dcc53c45a0bdd6868c747452ad4063f0
3
+ metadata.gz: 8fbb0d83f7d2f393e52aa5b7a8daa1dc68589f66
4
+ data.tar.gz: dfd2f83fe6460d3cff71eaf48007252fb8670598
5
5
  SHA512:
6
- metadata.gz: e177c4646f984d82757965664ee75fa617eec2c957b9a9a819e9bf39b12c8eae525bd907e0e4db70348983023dd1c15358aaee67e524d34486e767583027024b
7
- data.tar.gz: d164f062c4486dea26f3429aaf2c2b1c329247ef176c84398b83527e403f3e6fe1d2819bc8926afd107dcd88987fab000756f9d78a74c4712c600facb1e4596f
6
+ metadata.gz: e9b0e7b577b51f483be274b9fc63f6939bef0105111ebf8fcf209f2b296b94e9b6a806cf0d802f6f297ead143c4a6d47845451f7129cf493f58d6017dc064240
7
+ data.tar.gz: 5e6dd87df1be121548ffe5dcbc85ecd48ebe773e93929d168fcb5d9012aa201dd78cc4873ddfbe3823d2707c81fa52e5fccc4613de4c15352029e98ef8ec358d
data/README.md CHANGED
@@ -1,5 +1,3 @@
1
- [![Build Status](https://drone.io/github.com/opener-project/pos-tagger-base/status.png)](https://drone.io/github.com/opener-project/pos-tagger-base/latest)
2
-
3
1
  # Base POS Tagger
4
2
 
5
3
  This repository contains the source code (both Ruby and Python) for the base
@@ -107,4 +105,4 @@ For more information on the available Rake tasks run the following:
107
105
  ### POS-tags sets
108
106
 
109
107
  * Dutch: trained on conllx alpino data, wotan tagset
110
- * German: trained on TIGER corpus, STSS tagset
108
+ * German: trained on TIGER corpus, STSS tagset
@@ -1,5 +1,7 @@
1
1
  require 'open3'
2
+
2
3
  require_relative 'base/version'
4
+ require_relative 'base/de'
3
5
 
4
6
  module Opener
5
7
  module POSTaggers
@@ -8,6 +10,7 @@ module Opener
8
10
  #
9
11
  # @!attribute [r] args
10
12
  # @return [Array]
13
+ #
11
14
  # @!attribute [r] options
12
15
  # @return [Hash]
13
16
  #
@@ -21,8 +24,8 @@ module Opener
21
24
  # underlying Python script.
22
25
  #
23
26
  def initialize(options = {})
24
- @args = options.delete(:args) || []
25
- @options = options
27
+ @args = options.delete(:args) || []
28
+ @options = options
26
29
  end
27
30
 
28
31
  ##
@@ -31,12 +34,11 @@ module Opener
31
34
  # @return [String]
32
35
  #
33
36
  def command
34
- return "#{adjust_python_path} python -E #{kernel} #{args.join(' ')}"
37
+ return "python -E #{kernel} #{args.join(' ')}"
35
38
  end
36
39
 
37
40
  ##
38
- # Runs the command and returns the output of STDOUT, STDERR and the
39
- # process information.
41
+ # Runs the POS tagger and returns a KAF document as a String.
40
42
  #
41
43
  # @param [String] input The input to tag.
42
44
  # @return [String]
@@ -50,13 +52,6 @@ module Opener
50
52
  end
51
53
 
52
54
  protected
53
- ##
54
- # @return [String]
55
- #
56
- def adjust_python_path
57
- site_packages = File.join(core_dir, 'site-packages')
58
- "env PYTHONPATH=#{site_packages}:$PYTHONPATH"
59
- end
60
55
 
61
56
  ##
62
57
  # capture3 method doesn't work properly with Jruby, so
@@ -86,9 +81,5 @@ module Opener
86
81
  return File.join(core_dir, 'pos-tagger_open-nlp.py')
87
82
  end
88
83
  end # Base
89
-
90
- class DE < Base
91
- end # DE
92
-
93
84
  end # POSTaggers
94
85
  end # Opener
@@ -0,0 +1,9 @@
1
+ module Opener
2
+ module POSTaggers
3
+ ##
4
+ # POS tagger for German.
5
+ #
6
+ class DE < Base
7
+ end # DE
8
+ end # POSTaggers
9
+ end # Opener
@@ -1,7 +1,7 @@
1
1
  module Opener
2
2
  module POSTaggers
3
3
  class Base
4
- VERSION = '2.2.0'
4
+ VERSION = '2.2.1'
5
5
  end # Base
6
6
  end # POSTaggers
7
7
  end # Opener
@@ -3,5 +3,5 @@ task :requirements do
3
3
  require 'cliver'
4
4
 
5
5
  Cliver.detect!('python', '~> 2.6')
6
- Cliver.detect!('pip', '~> 1.3')
6
+ Cliver.detect!('pip', '>= 1.3')
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opener-pos-tagger-base
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - development@olery.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-25 00:00:00.000000000 Z
11
+ date: 2015-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -102,9 +102,10 @@ files:
102
102
  - core/site-packages/pre_install/VUKafParserPy/__init__.py
103
103
  - core/site-packages/pre_install/VUKafParserPy/__init__.pyc
104
104
  - core/token_matcher.py
105
- - core/token_matcher.pyo
105
+ - core/token_matcher.pyc
106
106
  - ext/hack/Rakefile
107
107
  - lib/opener/pos_taggers/base.rb
108
+ - lib/opener/pos_taggers/base/de.rb
108
109
  - lib/opener/pos_taggers/base/version.rb
109
110
  - opener-pos-tagger-base.gemspec
110
111
  - pre_install_requirements.txt