opener-tree-tagger 4.1.0 → 4.1.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: 17794acc1c73c9e2734d93fc7ad30343262806cd
4
- data.tar.gz: 8382d7a3f899f08568a9c021ef97199c00f4f24d
3
+ metadata.gz: 9aca59531b99c79ccd0c90b96cd29b97dbf5bafb
4
+ data.tar.gz: 0003f755f745bdcfe7b07b32cd73956f2ebccd4a
5
5
  SHA512:
6
- metadata.gz: ee5d95a22c467df609e58065aafc0962ef7dc9c12726c936dd5439786edce6330658096b01e91a1f2c3b43f022c36cee241f27ce83ccf481166faf5f6886780b
7
- data.tar.gz: 64fdfc566d03364ff5f7ce483fdaffe521b06c2b06355c089b7c222a8dac0b30146eadf1e8c8d536e4dad8cb24b90276e81a824a8b08ec28aef405a3d0107e23
6
+ metadata.gz: d82e488f8b2762298ab4be2f2ab856ee129c61cb666fa48297a44445024c0e78edcbf0a237625219451d695ec2a1843456922b500f2ccdc5798b7f1bd135eaf8
7
+ data.tar.gz: 957524f329e7ea0848787b8629f8728eab0102b3b9920a8cfa9abd4f2aa954c79c72e4462d3bc79d374e0b4b2cd5df4cc2d9a0aa8d87ba8dec31d6479307d05e
data/README.md CHANGED
@@ -1,5 +1,3 @@
1
- [![Build Status](https://drone.io/github.com/opener-project/VU-tree-tagger_kernel/status.png)](https://drone.io/github.com/opener-project/VU-tree-tagger_kernel/latest)
2
-
3
1
  Introduction
4
2
  ------------
5
3
 
@@ -152,4 +150,4 @@ Contributing
152
150
  2. Create your feature branch (`git checkout -b my-new-feature`)
153
151
  3. Commit your changes (`git commit -am 'Add some feature'`)
154
152
  4. Push to the branch (`git push origin my-new-feature`)
155
- 5. Create new Pull Request
153
+ 5. Create new Pull Request
Binary file
@@ -1,5 +1,5 @@
1
1
  module Opener
2
2
  class TreeTagger
3
- VERSION = '4.1.0'
3
+ VERSION = '4.1.1'
4
4
  end
5
5
  end
@@ -1,2 +1,2 @@
1
1
  desc 'Verifies requirements and compiles the core'
2
- task :compile => ['requirements', 'python:compile']
2
+ task :compile => ['requirements', 'python:compile', 'tree_tagger']
@@ -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
@@ -1,4 +1,6 @@
1
1
  desc 'Runs the tests'
2
2
  task :test => :compile do
3
+ ENV['TREE_TAGGER_PATH'] = File.expand_path('../../tmp/tree_tagger', __FILE__)
4
+
3
5
  sh('cucumber features')
4
6
  end
@@ -0,0 +1,104 @@
1
+ # This Rake task takes care of setting up a local (in ./tmp) installation of the
2
+ # TreeTagger program used by this OpeNER component. Sadly TreeTagger is a total
3
+ # pain to install and not shipped with Debian and other distributions. Yay
4
+ # software!
5
+ #
6
+ # Once installed you can set your TREE_TAGGER_PATH as following:
7
+ #
8
+ # export TREE_TAGGER_PATH=./tmp/tree_tagger
9
+
10
+ # The name of the TreeTagger archive to download. Currently only Linux and OS X
11
+ # are supported.
12
+ if RbConfig::CONFIG['build_os'].include?('darwin')
13
+ archive = 'tree-tagger-MacOSX-3.2-intel.tar.gz'
14
+ else
15
+ archive = 'tree-tagger-linux-3.2.tar.gz'
16
+ end
17
+
18
+ tagging_archive = 'tagger-scripts.tar.gz'
19
+ installer = 'install-tagger.sh'
20
+
21
+ parameter_tasks = []
22
+ parameter_files = [
23
+ 'dutch-par-linux-3.2-utf8.bin.gz',
24
+ 'english-par-linux-3.2-utf8.bin.gz',
25
+ 'french-par-linux-3.2-utf8.bin.gz',
26
+ 'german-par-linux-3.2-utf8.bin.gz',
27
+ 'italian-par-linux-3.2-utf8.bin.gz',
28
+ 'spanish-par-linux-3.2-utf8.bin.gz',
29
+ 'english-chunker-par-linux-3.2-utf8.bin.gz',
30
+ 'french-chunker-par-linux-3.2-utf8.bin.gz',
31
+ 'german-chunker-par-linux-3.2-utf8.bin.gz'
32
+ ]
33
+
34
+ base_url = 'http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/data/'
35
+ archive_url = base_url + archive
36
+ tagging_url = base_url + tagging_archive
37
+ installer_url = base_url + installer
38
+
39
+ tmp_target = 'tmp/tree_tagger'
40
+ tmp_executable = File.join(tmp_target, 'bin/tree-tagger')
41
+ tmp_archive = File.join(tmp_target, archive)
42
+ tmp_tagging_archive = File.join(tmp_target, tagging_archive)
43
+ tmp_installer = File.join(tmp_target, installer)
44
+
45
+ # Downloads the base TreeTagger code
46
+ file(tmp_archive) do |task|
47
+ sh "wget #{archive_url} -O #{task.name} --quiet"
48
+ end
49
+
50
+ # Downloads the tagging scripts.
51
+ file(tmp_tagging_archive) do |task|
52
+ sh "wget #{tagging_url} -O #{task.name} --quiet"
53
+ end
54
+
55
+ # Downloads the installer script.
56
+ file(tmp_installer) do |task|
57
+ sh "wget #{installer_url} -O #{task.name} --quiet"
58
+ end
59
+
60
+ directory(tmp_target) do |task|
61
+ sh "mkdir -p #{task.name}"
62
+ end
63
+
64
+ parameter_files.each do |name|
65
+ task_name = File.join(tmp_target, name)
66
+ input_url = base_url + name
67
+
68
+ parameter_tasks << task_name
69
+
70
+ file(task_name) do |task|
71
+ sh "wget #{input_url} -O #{task.name} --quiet"
72
+ end
73
+ end
74
+
75
+ file(tmp_executable) do |task|
76
+ # Downloaded half the internet, lets actually install TreeTagger.
77
+ Dir.chdir(tmp_target) do
78
+ sh "bash #{installer}"
79
+
80
+ # TreeTagger at some point dropped the "-utf8" suffix from tagging scripts
81
+ # located in cmd/, this however only applies to newer versions of the
82
+ # tagging scripts. To support both we'll simply symlink these files.
83
+ #
84
+ # In case you're wondering: no, TreeTagger doesn't version the tagging
85
+ # scripts, as such this could break again at any point in time.
86
+ Dir['cmd/tree-tagger-*'].each do |cmd_file|
87
+ cmd_file = File.expand_path(cmd_file)
88
+ suffixed = cmd_file + '-utf8'
89
+
90
+ sh "ln -s #{cmd_file} #{suffixed}"
91
+ sh "chmod +x #{suffixed}"
92
+ end
93
+ end
94
+ end
95
+
96
+ build_requirements = [
97
+ tmp_target,
98
+ tmp_archive,
99
+ tmp_tagging_archive,
100
+ tmp_installer
101
+ ] + parameter_tasks + [tmp_executable]
102
+
103
+ desc 'Installs a local copy of TreeTagger'
104
+ task :tree_tagger => build_requirements
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opener-tree-tagger
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 4.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - rubenIzquierdo
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-11-26 00:00:00.000000000 Z
12
+ date: 2015-01-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: opener-daemons
@@ -163,7 +163,6 @@ files:
163
163
  - core/spanish.map.treetagger.kaf.csv
164
164
  - core/token_matcher.py
165
165
  - core/token_matcher.pyc
166
- - core/token_matcher.pyo
167
166
  - core/tt_from_kaf_to_kaf.py
168
167
  - exec/tree-tagger.rb
169
168
  - ext/hack/Rakefile
@@ -180,6 +179,7 @@ files:
180
179
  - task/python.rake
181
180
  - task/requirements.rake
182
181
  - task/test.rake
182
+ - task/tree_tagger.rake
183
183
  homepage: http://opener-project.github.com/
184
184
  licenses:
185
185
  - Apache 2.0
Binary file