brstemmer 0.1.0 → 0.1.1
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.
- checksums.yaml +4 -4
- data/.rspec +2 -0
- data/README.md +24 -1
- data/Rakefile +2 -0
- data/brstemmer-0.1.0.gem +0 -0
- data/brstemmer.gemspec +2 -0
- data/lib/brstemmer/version.rb +1 -1
- data/lib/brstemmer.rb +1 -1
- data/rspec.rake +3 -0
- metadata +17 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 91f08b8bae6db1b16e1246170ab54a12a1a0fa37
         | 
| 4 | 
            +
              data.tar.gz: a064962ff2336ff62c405d16ebc9512c1b9b6ebd
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 1c4df5d3e5dc20568dd5d5272c38d6879fb65d2cfdece098925acb9046d2dd34be57aa620d37717bb96a97f081a1793d078114e9f4721623c7c5f021e5dc830c
         | 
| 7 | 
            +
              data.tar.gz: d92de631e33226349d2491d8594bcea60b882529e092511e4ed9f49b88099d34502e61db4bd3c4091a06f78299b983b5e1f05bb6a248ef02baa271a307e95cd6
         | 
    
        data/.rspec
    ADDED
    
    
    
        data/README.md
    CHANGED
    
    | @@ -21,9 +21,12 @@ Or install it yourself as: | |
| 21 21 | 
             
            ## Usage
         | 
| 22 22 |  | 
| 23 23 | 
             
            ```ruby
         | 
| 24 | 
            +
                require 'brstemmer'
         | 
| 24 25 | 
             
                puts "Correndo".brstemmer
         | 
| 25 | 
            -
             | 
| 26 26 | 
             
                # Corr
         | 
| 27 | 
            +
             | 
| 28 | 
            +
                puts "pulei".brstemmer
         | 
| 29 | 
            +
                # pul
         | 
| 27 30 | 
             
            ```
         | 
| 28 31 |  | 
| 29 32 | 
             
            ## Contributing
         | 
| @@ -35,3 +38,23 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/tacnom | |
| 35 38 |  | 
| 36 39 | 
             
            The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
         | 
| 37 40 |  | 
| 41 | 
            +
            ### Test
         | 
| 42 | 
            +
             | 
| 43 | 
            +
            To run tests:
         | 
| 44 | 
            +
             | 
| 45 | 
            +
            ```
         | 
| 46 | 
            +
                $ bundle exec rspec
         | 
| 47 | 
            +
            ```
         | 
| 48 | 
            +
             | 
| 49 | 
            +
            ### TODO!
         | 
| 50 | 
            +
            Write more tests for rules augmentative_reduction, noun_reduction, verb_reduction, vowel_reduction and accent_reduction.
         | 
| 51 | 
            +
             | 
| 52 | 
            +
            # Changelog
         | 
| 53 | 
            +
             | 
| 54 | 
            +
            ### 0.1.1
         | 
| 55 | 
            +
            - Fix bug with suffix size
         | 
| 56 | 
            +
             | 
| 57 | 
            +
            ### 0.1.0
         | 
| 58 | 
            +
            - Initial commit
         | 
| 59 | 
            +
            - Stemmer br
         | 
| 60 | 
            +
            - Basic tests
         | 
    
        data/Rakefile
    CHANGED
    
    
    
        data/brstemmer-0.1.0.gem
    CHANGED
    
    | Binary file | 
    
        data/brstemmer.gemspec
    CHANGED
    
    
    
        data/lib/brstemmer/version.rb
    CHANGED
    
    
    
        data/lib/brstemmer.rb
    CHANGED
    
    | @@ -559,7 +559,7 @@ module Brstemmer | |
| 559 559 | 
             
                  aux_word = @word
         | 
| 560 560 | 
             
                  if @word =~ /#{suffix}$/
         | 
| 561 561 | 
             
                    @word.gsub!(/#{suffix}$/, replaced) if
         | 
| 562 | 
            -
                        (not excpts.nil? and excpts.detect { |expt| @word == expt }.nil? or excpts.nil?) and @word.length - suffix.length >= size
         | 
| 562 | 
            +
                        ((not excpts.nil? and excpts.detect { |expt| @word == expt }.nil?) or excpts.nil?) and (@word.length - suffix.length + replaced.length) >= size
         | 
| 563 563 | 
             
                  end
         | 
| 564 564 |  | 
| 565 565 | 
             
                  @suffix_removed = true if aux_word != @word
         | 
    
        data/rspec.rake
    ADDED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: brstemmer
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Tacnoman
         | 
| @@ -38,6 +38,20 @@ dependencies: | |
| 38 38 | 
             
                - - "~>"
         | 
| 39 39 | 
             
                  - !ruby/object:Gem::Version
         | 
| 40 40 | 
             
                    version: '10.0'
         | 
| 41 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 42 | 
            +
              name: rspec
         | 
| 43 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 44 | 
            +
                requirements:
         | 
| 45 | 
            +
                - - ">="
         | 
| 46 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 47 | 
            +
                    version: '0'
         | 
| 48 | 
            +
              type: :development
         | 
| 49 | 
            +
              prerelease: false
         | 
| 50 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 51 | 
            +
                requirements:
         | 
| 52 | 
            +
                - - ">="
         | 
| 53 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 54 | 
            +
                    version: '0'
         | 
| 41 55 | 
             
            description: Stemmer algorithm in pt-BR
         | 
| 42 56 | 
             
            email:
         | 
| 43 57 | 
             
            - renatocassino@gmail.com
         | 
| @@ -46,6 +60,7 @@ extensions: [] | |
| 46 60 | 
             
            extra_rdoc_files: []
         | 
| 47 61 | 
             
            files:
         | 
| 48 62 | 
             
            - ".gitignore"
         | 
| 63 | 
            +
            - ".rspec"
         | 
| 49 64 | 
             
            - CODE_OF_CONDUCT.md
         | 
| 50 65 | 
             
            - Gemfile
         | 
| 51 66 | 
             
            - LICENSE.txt
         | 
| @@ -57,6 +72,7 @@ files: | |
| 57 72 | 
             
            - brstemmer.gemspec
         | 
| 58 73 | 
             
            - lib/brstemmer.rb
         | 
| 59 74 | 
             
            - lib/brstemmer/version.rb
         | 
| 75 | 
            +
            - rspec.rake
         | 
| 60 76 | 
             
            homepage: https://github.com/tacnoman/brstemmer.git
         | 
| 61 77 | 
             
            licenses:
         | 
| 62 78 | 
             
            - MIT
         |