lib/anystyle/parser/normalizer.rb
# Default normalizer. Strips punctuation.
Default normalizer. Strips punctuation.
Default normalizer . Strips punctuation .
def normalize(key, hash)
        token, *dangling =  hash[key]
        unmatched(key, hash, dangling) unless dangling.empty?
        token.gsub!(/^[^[:alnum:]]+|[^[:alnum:]]+$/, '')
        hash[key] = token
        hash
      end
def normalize ( key , hash ) token , * dangling = hash [ key ] unmatched ( key , hash , dangling ) unless dangling . empty? token . gsub! ( / ^[^[:alnum:]]+|[^[:alnum:]]+$ / , '' ) hash [ key ] = token hash end
Default normalizer.
Default normalizer .
key
<not_specific>
hash
<not_specific>