greek_stemmer 1.0.3 → 1.0.4

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: 9e6480a59e8a9b2f51d2fe2380e1df8444af9f36
4
- data.tar.gz: 1a598cfa930bc69d95664225ace1c7ed9b10bf67
3
+ metadata.gz: 014ea70b04e866ca974455411bf3fb6243c70463
4
+ data.tar.gz: 2b0e26f0e2a6bdc484f7d945292fe151a4c86caa
5
5
  SHA512:
6
- metadata.gz: 20d98fe7bc0437a4b1c9cce1d74181148e57e13049fd15dfbf5e0e4bc3a328280a068daf6945ea47ccdbe5e39b4c99a4ca10fcc1f075d49156a24a177ede8550
7
- data.tar.gz: 37b30b0d1cb5e711d8cc0fa2f98c37f887214639be2757ea0f3dc4ea8de8dd525cc6399bfd1669b1adf73f801d57868d3ae85cf814ce60d9e6d7ffc2f38e93b7
6
+ metadata.gz: c50983d62009371959e61890deb63d80bc6a2e7cac99cbfd698be82ef00827fc12aecc0b1cac74ddd5ea25cc65c61992f101995ac7b03ae09f02d7e809983526
7
+ data.tar.gz: f8f35d1daed8e137a3c7c96f7799d3ebd6b69753d3406dbb0369fcedc6ae24a4d4a31bed89f61b520470139b9adaf311f4ac6ca6ddf1d44b15d56a5e87e8f553
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format doc
data/.travis.yml ADDED
@@ -0,0 +1,8 @@
1
+ language: ruby
2
+ rvm:
3
+ - "1.9.3"
4
+ - "2.0.0"
5
+ - "2.1.0"
6
+ - "jruby-19mode"
7
+
8
+ script: bundle exec rspec spec
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in greek_stemmer.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Skroutz SA
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # GreekStemmer
2
+
3
+ A simple Greek stemmer algorithm.
4
+
5
+ This algorithm is based on this [paper](http://people.dsv.su.se/~hercules/papers/Ntais_greek_stemmer_thesis_final.pdf) from George Ntais.
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ gem 'greek_stemmer'
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install greek_stemmer
20
+
21
+ ## Usage
22
+
23
+ In order to use this stemmer you should normalize input.
24
+ Normalization means two things for this algorithm: detone and upcase.
25
+
26
+ ```ruby
27
+ require 'greek_stemmer'
28
+
29
+ GreekStemmer.stem("ΠΟΣΟΤΗΤΑ") # => "ΠΟΣΟΤΗΤ"
30
+ ```
31
+
32
+ ## References
33
+
34
+ * [Development of a Stemmer for the Greek Language](http://people.dsv.su.se/~hercules/papers/Ntais_greek_stemmer_thesis_final.pdf)
35
+
36
+ ## Credits
37
+
38
+ Original work: [bandito](https://github.com/bandito)
39
+
40
+ ## Contributing
41
+
42
+ 1. Fork it ( http://github.com/<my-github-username>/greek_stemmer/fork )
43
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
44
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
45
+ 4. Push to the branch (`git push origin my-new-feature`)
46
+ 5. Create new Pull Request
47
+
48
+ ## License
49
+
50
+ greek_stemmer is licensed under MIT License. See [LICENSE](LICENSE.txt) for details.
51
+
data/Rakefile ADDED
@@ -0,0 +1,20 @@
1
+ require "bundler/gem_tasks"
2
+ require "greek_stemmer"
3
+
4
+ desc "Update the stems of the sample words"
5
+ task :update_greek_stemming_sample do
6
+
7
+ words = Set.new
8
+ File.open("benchmarks/stemming_sample.txt", "r") do |sample|
9
+ while(line = sample.gets)
10
+ word, _ = line.split(",")
11
+ words << word
12
+ end
13
+ end
14
+
15
+ File.open("benchmarks/stemming_sample.txt", "w") do |sample|
16
+ words.each do |word|
17
+ sample.puts "#{word},#{GreekStemmer.stem(word)}"
18
+ end
19
+ end
20
+ end