opener-constituent-parser 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +141 -17
- data/lib/opener/constituent_parser/cli.rb +8 -4
- data/lib/opener/constituent_parser/version.rb +1 -1
- metadata +34 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa16e039150d93fc7ac549fd0c0b04e1bd1df8eb
|
4
|
+
data.tar.gz: 7145f50efe569752050f8474f8b0e461a97eb5b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40325995229ad5669f5d2f2e0da6959d2575308f1f5dde6326fbdc79f127a39605eaa4c9ed212e876ff0299715ed29b084aa73e31c73603f4078b5239f9b647b
|
7
|
+
data.tar.gz: 6eac07f7d1fe8a492e2db6254d5586988d21f096bdb005f7f3468fb8fe42c448dc13d4844db4edbd1e6aa5461b4ba54b02067ef7f36d48675c9a9f0814bfabfa
|
data/README.md
CHANGED
@@ -1,30 +1,154 @@
|
|
1
|
-
|
1
|
+
Constituent-Parser
|
2
|
+
------------------
|
2
3
|
|
3
|
-
|
4
|
-
|
4
|
+
The constituent parser wraps several other constituent parsers into a component
|
5
|
+
that parses the 6 main opener languages. Each language uses it's own parser and
|
6
|
+
core. For more information on the specific languages, please check the
|
7
|
+
individual cores.
|
5
8
|
|
6
|
-
|
9
|
+
* (English, Spanish and French)[https://github.com/opener-project/constituent-parser-base] - OpeNER
|
10
|
+
* (German)[https://github.com/opener-project/constituent-parser-de] - Stanford
|
11
|
+
Based
|
12
|
+
* (Dutch)[https://github.com/opener-project/constituent-parser-nl] - Alpino
|
13
|
+
Based
|
7
14
|
|
8
|
-
* Ruby 1.9.2 or newer
|
9
15
|
|
10
|
-
|
16
|
+
### Confused by some terminology?
|
11
17
|
|
12
|
-
|
18
|
+
This software is part of a larger collection of natural language processing
|
19
|
+
tools known as "the OpeNER project". You can find more information about the
|
20
|
+
project at (the OpeNER portal)[http://opener-project.github.io]. There you can
|
21
|
+
also find references to terms like KAF (an XML standard to represent linguistic
|
22
|
+
annotations in texts), component, cores, scenario's and pipelines.
|
23
|
+
|
24
|
+
Quick Use Example
|
25
|
+
-----------------
|
26
|
+
|
27
|
+
Installing the constituent-parser can be done by executing:
|
13
28
|
|
14
29
|
gem install opener-constituent-parser
|
15
30
|
|
16
|
-
|
31
|
+
Please bare in mind that all components in OpeNER take KAF as an input and
|
32
|
+
output KAF by default.
|
33
|
+
|
34
|
+
### Command line interface
|
35
|
+
|
36
|
+
You should now be able to call the constituent parser as a regular shell
|
37
|
+
command: by its name. Once installed the gem normalyl sits in your path so you can call it directly from anywhere.
|
38
|
+
|
39
|
+
This aplication reads a text from standard input in order to identify the language.
|
40
|
+
|
41
|
+
cat some_kind_of_kaf_file.kaf | constituent-parser
|
42
|
+
|
43
|
+
|
44
|
+
This is an excerpt of an example output:
|
45
|
+
|
46
|
+
```
|
47
|
+
<!--he-->
|
48
|
+
<t id="ter761">
|
49
|
+
<span>
|
50
|
+
<target id="t761" />
|
51
|
+
</span>
|
52
|
+
</t>
|
53
|
+
<!--added-->
|
54
|
+
<t id="ter762">
|
55
|
+
<span>
|
56
|
+
<target id="t762" />
|
57
|
+
</span>
|
58
|
+
</t>
|
59
|
+
<!--.-->
|
60
|
+
<t id="ter763">
|
61
|
+
<span>
|
62
|
+
<target id="t763" />
|
63
|
+
</span>
|
64
|
+
</t>
|
65
|
+
<!--Tree edges-->
|
66
|
+
<edge id="tre2051" from="nter1328" to="nter1327" />
|
67
|
+
<edge id="tre2052" from="nter1329" to="nter1328" />
|
68
|
+
<edge id="tre2053" from="nter1330" to="nter1329" />
|
69
|
+
<edge id="tre2054" from="nter1331" to="nter1330" head="yes" />
|
70
|
+
<edge id="tre2055" from="nter1332" to="nter1331" head="yes" />
|
71
|
+
<edge id="tre2056" from="nter1333" to="nter1332" />
|
72
|
+
|
73
|
+
```
|
74
|
+
|
75
|
+
### Webservices
|
76
|
+
|
77
|
+
You can launch a language identification webservice by executing:
|
78
|
+
|
79
|
+
constituent-parser-server
|
80
|
+
|
81
|
+
This will launch a mini webserver with the webservice. It defaults to port 9292,
|
82
|
+
so you can access it at <http://localhost:9292>.
|
83
|
+
|
84
|
+
To launch it on a different port provide the `-p [port-number]` option like
|
85
|
+
this:
|
86
|
+
|
87
|
+
constituent-parser-server -p 1234
|
88
|
+
|
89
|
+
It then launches at <http://localhost:1234>
|
90
|
+
|
91
|
+
Documentation on the Webservice is provided by surfing to the urls provided
|
92
|
+
above. For more information on how to launch a webservice run the command with
|
93
|
+
the ```-h``` option.
|
94
|
+
|
95
|
+
|
96
|
+
### Daemon
|
97
|
+
|
98
|
+
Last but not least the constituent parser comes shipped with a daemon that
|
99
|
+
can read jobs (and write) jobs to and from Amazon SQS queues. For more
|
100
|
+
information type:
|
101
|
+
|
102
|
+
constituent-parser-daemon -h
|
103
|
+
|
104
|
+
|
105
|
+
Description of dependencies
|
106
|
+
---------------------------
|
107
|
+
|
108
|
+
This component runs best if you run it in an environment suited for OpeNER
|
109
|
+
components. You can find an installation guide and helper tools in the (OpeNER
|
110
|
+
installer)[https://github.com/opener-project/opener-installer] and (an
|
111
|
+
installation guide on the Opener
|
112
|
+
Website)[http://opener-project.github.io/getting-started/how-to/local-installation.html]
|
113
|
+
|
114
|
+
At least you need the following system setup:
|
115
|
+
|
116
|
+
### Depenencies for normal use:
|
117
|
+
|
118
|
+
* Jruby (1.7.9 or newer)
|
119
|
+
* Java 1.7 or newer (There are problems with encoding in older versions).
|
120
|
+
* Python 2.6
|
121
|
+
|
122
|
+
If you want to use the Dutch constituent parser you need to have:
|
123
|
+
|
124
|
+
* Alpino (http://www.let.rug.nl/vannoord/alp/Alpino/AlpinoUserGuide.html)
|
125
|
+
|
126
|
+
Language Extension
|
127
|
+
------------------
|
128
|
+
|
129
|
+
TODO
|
130
|
+
|
131
|
+
|
132
|
+
Where to go from here
|
133
|
+
---------------------
|
134
|
+
|
135
|
+
* Check (the project websitere)[http://opener-project.github.io]
|
136
|
+
* (Checkout the webservice)[http://opener.olery.com/constituent-parser]
|
137
|
+
|
138
|
+
Report problem/Get help
|
139
|
+
-----------------------
|
140
|
+
|
141
|
+
If you encounter problems, please email support@opener-project.eu or leave an
|
142
|
+
issue in the (issue tracker)[https://github.com/opener-project/constituent-parser/issues].
|
17
143
|
|
18
|
-
gem 'opener-constituent-parser',
|
19
|
-
:git => 'git@github.com:opener-project/constituent-parser.git',
|
20
|
-
:branch => 'master'
|
21
144
|
|
22
|
-
|
145
|
+
Contributing
|
146
|
+
------------
|
23
147
|
|
24
|
-
|
25
|
-
|
26
|
-
|
148
|
+
1. Fork it ( http://github.com/opener-project/constituent-parser/fork )
|
149
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
150
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
151
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
152
|
+
5. Create new Pull Request
|
27
153
|
|
28
|
-
## Usage
|
29
154
|
|
30
|
-
cat some_input_file.kaf | constituent-parser -l en
|
@@ -57,12 +57,16 @@ Examples:
|
|
57
57
|
|
58
58
|
stdout, stderr, process = runner.run(input)
|
59
59
|
|
60
|
-
if process
|
61
|
-
|
60
|
+
if process
|
61
|
+
if process.success?
|
62
|
+
puts stdout
|
62
63
|
|
63
|
-
|
64
|
+
STDERR.puts(stderr) unless stderr.empty?
|
65
|
+
else
|
66
|
+
abort stderr
|
67
|
+
end
|
64
68
|
else
|
65
|
-
|
69
|
+
puts stdout
|
66
70
|
end
|
67
71
|
end
|
68
72
|
|
metadata
CHANGED
@@ -1,73 +1,73 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opener-constituent-parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- development@olery.com
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opener-webservice
|
15
|
-
|
15
|
+
version_requirements: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
|
-
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirement: !ruby/object:Gem::Requirement
|
23
21
|
requirements:
|
24
|
-
- -
|
22
|
+
- - '>='
|
25
23
|
- !ruby/object:Gem::Version
|
26
24
|
version: '0'
|
25
|
+
prerelease: false
|
26
|
+
type: :runtime
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: opener-constituent-parser-base
|
29
|
-
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.1.0
|
34
|
-
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
37
35
|
requirements:
|
38
|
-
- -
|
36
|
+
- - '>='
|
39
37
|
- !ruby/object:Gem::Version
|
40
38
|
version: 0.1.0
|
39
|
+
prerelease: false
|
40
|
+
type: :runtime
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: opener-build-tools
|
43
|
-
|
43
|
+
version_requirements: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
|
-
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
51
49
|
requirements:
|
52
|
-
- -
|
50
|
+
- - '>='
|
53
51
|
- !ruby/object:Gem::Version
|
54
52
|
version: '0'
|
53
|
+
prerelease: false
|
54
|
+
type: :development
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
|
-
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
|
-
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
62
|
+
requirement: !ruby/object:Gem::Requirement
|
65
63
|
requirements:
|
66
|
-
- -
|
64
|
+
- - '>='
|
67
65
|
- !ruby/object:Gem::Version
|
68
66
|
version: '0'
|
67
|
+
prerelease: false
|
68
|
+
type: :development
|
69
69
|
description: Constituent parser including a webservice.
|
70
|
-
email:
|
70
|
+
email:
|
71
71
|
executables:
|
72
72
|
- constituent-parser
|
73
73
|
- constituent-parser-server
|
@@ -85,28 +85,27 @@ files:
|
|
85
85
|
- lib/opener/constituent_parser/version.rb
|
86
86
|
- lib/opener/constituent_parser/views/index.erb
|
87
87
|
- opener-constituent-parser.gemspec
|
88
|
-
homepage:
|
88
|
+
homepage:
|
89
89
|
licenses: []
|
90
90
|
metadata: {}
|
91
|
-
post_install_message:
|
91
|
+
post_install_message:
|
92
92
|
rdoc_options: []
|
93
93
|
require_paths:
|
94
94
|
- lib
|
95
95
|
required_ruby_version: !ruby/object:Gem::Requirement
|
96
96
|
requirements:
|
97
|
-
- -
|
97
|
+
- - '>='
|
98
98
|
- !ruby/object:Gem::Version
|
99
99
|
version: 1.9.2
|
100
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- -
|
102
|
+
- - '>='
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
|
-
rubyforge_project:
|
106
|
+
rubyforge_project:
|
107
107
|
rubygems_version: 2.2.2
|
108
|
-
signing_key:
|
108
|
+
signing_key:
|
109
109
|
specification_version: 4
|
110
110
|
summary: Constituent parser including a webservice.
|
111
111
|
test_files: []
|
112
|
-
has_rdoc: yard
|