ots 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +7 -2
- data/ext/extconf.rb +14 -4
- data/ext/{article.c → libots/article.c} +0 -0
- data/ext/{dictionary.c → libots/dictionary.c} +0 -0
- data/ext/{grader-tc.c → libots/grader-tc.c} +0 -0
- data/ext/{grader-tc.h → libots/grader-tc.h} +0 -0
- data/ext/{grader-tf.c → libots/grader-tf.c} +0 -0
- data/ext/{grader.c → libots/grader.c} +0 -0
- data/ext/{highlighter.c → libots/highlighter.c} +0 -0
- data/ext/{html.c → libots/html.c} +0 -0
- data/ext/{libots.h → libots/libots.h} +0 -0
- data/ext/{parser.c → libots/parser.c} +0 -0
- data/ext/{relations.c → libots/relations.c} +0 -0
- data/ext/{stemmer.c → libots/stemmer.c} +0 -0
- data/ext/{text.c → libots/text.c} +0 -0
- data/ext/{wordlist.c → libots/wordlist.c} +0 -0
- data/ext/version.h +1 -1
- metadata +17 -17
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# OTS
|
2
2
|
|
3
|
-
ots is an interface to libots - The [
|
3
|
+
ots is an interface to libots - The [Open Text Summarizer](http://libots.sourceforge.net/).
|
4
4
|
|
5
5
|
## Dependencies
|
6
6
|
|
@@ -40,6 +40,11 @@ ots is an interface to libots - The [open text summarizer](http://libots.sourcef
|
|
40
40
|
# install glib
|
41
41
|
brew install glib
|
42
42
|
|
43
|
+
# setup the environment variables in order to install ots
|
44
|
+
export CPPFLAGS=-I/usr/local/Cellar/glib/2.30.2/include/glib-2.0/
|
45
|
+
export LDFLAGS=-L/usr/local/Cellar/glib/2.30.2/lib/
|
46
|
+
export PKG_CONFIG_PATH=/usr/local/Cellar/glib/2.30.2/lib/pkgconfig/
|
47
|
+
|
43
48
|
# install ots
|
44
49
|
gem install ots
|
45
50
|
|
@@ -73,7 +78,7 @@ ots is an interface to libots - The [open text summarizer](http://libots.sourcef
|
|
73
78
|
article.summarize(percent: 50)
|
74
79
|
article.summarize(sentences: 1)
|
75
80
|
|
76
|
-
OTS.languages #=> list of supported
|
81
|
+
OTS.languages #=> list of supported language dictionaries baked-in to libots
|
77
82
|
```
|
78
83
|
|
79
84
|
## See Also
|
data/ext/extconf.rb
CHANGED
@@ -16,10 +16,20 @@ if glib_ldflags.empty?
|
|
16
16
|
end
|
17
17
|
|
18
18
|
dir = File.expand_path(File.dirname(__FILE__) + '/../dictionaries')
|
19
|
-
$CFLAGS = glib_cflags
|
20
|
-
$LDFLAGS = glib_ldflags
|
19
|
+
$CFLAGS = glib_cflags + %Q{ -Ilibots -I/usr/include/libxml2 -DDICTIONARY_DIR='"#{dir}/"'}
|
20
|
+
$LDFLAGS = glib_ldflags + %Q{ -Llibots}
|
21
21
|
|
22
|
-
find_library('glib-2.0', 'main')
|
23
|
-
find_library('xml2', 'main')
|
22
|
+
find_library('glib-2.0', 'main') or raise "unable to find glib-2.0"
|
23
|
+
find_library('xml2', 'main') or raise "unable to find libxml2"
|
24
|
+
|
25
|
+
# ugly mkmf hack: manually assign source and object directories.
|
26
|
+
$srcs = Dir["{libots/*.c,*.c}"]
|
27
|
+
$objs = $srcs.map {|name| File.join(File.dirname(name), File.basename(name, ".c") + ".o")}
|
28
|
+
|
29
|
+
class File
|
30
|
+
def self.basename name
|
31
|
+
name
|
32
|
+
end
|
33
|
+
end
|
24
34
|
|
25
35
|
create_makefile 'ots'
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/ext/version.h
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
#pragma once
|
2
|
-
#define RUBY_OTS_VERSION "0.5.
|
2
|
+
#define RUBY_OTS_VERSION "0.5.2"
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 5
|
8
|
-
-
|
9
|
-
version: 0.5.
|
8
|
+
- 2
|
9
|
+
version: 0.5.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Bharanee Rathna
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2012-01-
|
17
|
+
date: 2012-01-25 00:00:00 +11:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -53,23 +53,23 @@ extensions:
|
|
53
53
|
extra_rdoc_files: []
|
54
54
|
|
55
55
|
files:
|
56
|
-
- ext/text.c
|
57
|
-
- ext/grader-tf.c
|
58
|
-
- ext/stemmer.c
|
59
|
-
- ext/article.c
|
60
|
-
- ext/grader-tc.c
|
61
|
-
- ext/html.c
|
62
|
-
- ext/grader.c
|
63
56
|
- ext/ots.c
|
64
|
-
- ext/
|
65
|
-
- ext/
|
66
|
-
- ext/
|
67
|
-
- ext/
|
68
|
-
- ext/
|
69
|
-
- ext/
|
57
|
+
- ext/libots/text.c
|
58
|
+
- ext/libots/grader-tf.c
|
59
|
+
- ext/libots/stemmer.c
|
60
|
+
- ext/libots/article.c
|
61
|
+
- ext/libots/grader-tc.c
|
62
|
+
- ext/libots/html.c
|
63
|
+
- ext/libots/grader.c
|
64
|
+
- ext/libots/relations.c
|
65
|
+
- ext/libots/parser.c
|
66
|
+
- ext/libots/dictionary.c
|
67
|
+
- ext/libots/highlighter.c
|
68
|
+
- ext/libots/wordlist.c
|
70
69
|
- ext/ots.h
|
71
|
-
- ext/libots.h
|
72
70
|
- ext/version.h
|
71
|
+
- ext/libots/grader-tc.h
|
72
|
+
- ext/libots/libots.h
|
73
73
|
- ext/extconf.rb
|
74
74
|
- test/test_article.rb
|
75
75
|
- test/test_ots.rb
|