suika 0.1.3 → 0.1.4
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/CHANGELOG.md +23 -4
 - data/lib/suika/char_def.rb +5 -3
 - data/lib/suika/version.rb +1 -1
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 2aafd394952b381595891fab5652ed86c1c71a18d09befd1ffa2cd4bfdb05e8e
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 33385a74bac5c831a7116aa34ee31c5470154c928e971926b7f0f112b3cf1264
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 80de1122cb9aae4a3313bb1ee95594435415dcacb197ef9bbf33a2695f57b9cc14c8f466aab19c8f487f1f4c3e4107ecd3851fad217921f61511655b5309fb21
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: e0e9b76d04c847f6c1a8013db4b8a05ab9050dbde59d25c76d66fee078ac6b2ca230652b03ee61f3d97b7eebdc1139a34fb790fc5c954b072b55747e1933415a
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,12 +1,31 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
             
     | 
| 
      
 1 
     | 
    
         
            +
            ## 0.1.4
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            ### Bug Fixes
         
     | 
| 
      
 4 
     | 
    
         
            +
            - Fix CharDef.char_type to return 'DEFAULT' when unknown character code is given.
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            ### Features
         
     | 
| 
      
 7 
     | 
    
         
            +
            - Add character code of square era name Reiwa.
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            ## 0.1.3
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            ### Bug Fixes
         
     | 
| 
       2 
12 
     | 
    
         
             
            - Fix unknown word processing.
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
            ### Changes
         
     | 
| 
       3 
15 
     | 
    
         
             
            - Remove redundant spaces from output.
         
     | 
| 
       4 
16 
     | 
    
         | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            ## 0.1.2
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
            ### Bug Fixes
         
     | 
| 
       6 
21 
     | 
    
         
             
            - Fix local variable typo in Tagger.parse.
         
     | 
| 
       7 
22 
     | 
    
         | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
            ## 0.1.1
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
            ### Bug Fixes
         
     | 
| 
       9 
27 
     | 
    
         
             
            - Fix specification of class in CharDef.char_type.
         
     | 
| 
       10 
28 
     | 
    
         | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
            ## 0.1.0
         
     | 
| 
       12 
31 
     | 
    
         
             
            - First release.
         
     | 
    
        data/lib/suika/char_def.rb
    CHANGED
    
    | 
         @@ -5,10 +5,11 @@ module Suika 
     | 
|
| 
       5 
5 
     | 
    
         
             
              class CharDef
         
     | 
| 
       6 
6 
     | 
    
         
             
                # @!visibility private
         
     | 
| 
       7 
7 
     | 
    
         
             
                def self.char_type(ch)
         
     | 
| 
       8 
     | 
    
         
            -
                   
     | 
| 
       9 
     | 
    
         
            -
                  CHAR_TYPES.find do | 
     | 
| 
       10 
     | 
    
         
            -
                    Object.const_get("::Suika::CharDef::#{ 
     | 
| 
      
 8 
     | 
    
         
            +
                  ch_code = ch.unpack1('U*')
         
     | 
| 
      
 9 
     | 
    
         
            +
                  ch_type = CHAR_TYPES.find do |ct|
         
     | 
| 
      
 10 
     | 
    
         
            +
                    Object.const_get("::Suika::CharDef::#{ct}").any? { |r| r.include?(ch_code) }
         
     | 
| 
       11 
11 
     | 
    
         
             
                  end
         
     | 
| 
      
 12 
     | 
    
         
            +
                  ch_type || 'DEFAULT'
         
     | 
| 
       12 
13 
     | 
    
         
             
                end
         
     | 
| 
       13 
14 
     | 
    
         | 
| 
       14 
15 
     | 
    
         
             
                # @!visibility private
         
     | 
| 
         @@ -119,6 +120,7 @@ module Suika 
     | 
|
| 
       119 
120 
     | 
    
         
             
                  0x2B00..0x2BFF,  # Miscellaneous Symbols and Arrows
         
     | 
| 
       120 
121 
     | 
    
         
             
                  0x2A00..0x2AFF,  # Supplemental Mathematical Operators
         
     | 
| 
       121 
122 
     | 
    
         
             
                  0x3300..0x33FF,
         
     | 
| 
      
 123 
     | 
    
         
            +
                  0x32FF..0x32FF,  # Square era name REIWA
         
     | 
| 
       122 
124 
     | 
    
         
             
                  0x3200..0x32FE,  # ENclosed CJK Letters and Months
         
     | 
| 
       123 
125 
     | 
    
         
             
                  0x3000..0x303F,  # CJK Symbol and Punctuation
         
     | 
| 
       124 
126 
     | 
    
         
             
                  0xFE30..0xFE4F,  # CJK Compatibility Forms
         
     | 
    
        data/lib/suika/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: suika
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.4
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - yoshoku
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2020-07- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2020-07-08 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: rambling-trie
         
     |