Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Minor utilities for text processing in Brazilian Portuguese.
I'm going to add new functions as I need them.
Currently it has:
The name of the gem is a homage to "Prof. Pasquale Cipro Neto" (http://pt.wikipedia.org/wiki/Pasquale_Cipro_Neto), a great teacher! And yes, the name of the gem is wrong spelled as a joke ^_^
Add this line to your application's Gemfile:
gem 'pascoale'
And then execute:
$ bundle
Or install it yourself as:
$ gem install pascoale
Pluralization and singularization
*(Lowercase only)
require 'pascoale'
capt = Pascoale::Inflector.new('capitão')
puts capt.pluralize # => capitães
capts = Pascoale::Inflector.new('capitães')
puts capts.singularize # => capitão
captn = Pascoale::Inflector.new('capitãozinho')
puts captn.singularize # => capitãezinhos
qq = Pascoale::Inflector.new('qualquer')
puts qq.singularize # => quaisquer
Proparoxytones, Paroxytones and Oxytones
*(Lowercase only)
require 'pascoale'
diox = Pascoale::Reflector.new('dióxido')
puts diox.proparoxytone? # => true
puts diox.paroxytone? # => false
puts diox.oxytone? # => false
ideia = Pascoale::Reflector.new('ideia')
puts ideia.proparoxytone? # => false
puts ideia.paroxytone? # => true
puts ideia.oxytone? # => false
parati = Pascoale::Reflector.new('parati')
puts parati.proparoxytone? # => false
puts parati.paroxytone? # => false
puts parati.oxytone? # => true
Text formatter
require 'pascoale'
text = Pascoale::Formatter.new('Isso é um teste de formatação')
# Basic formatting
puts text.upcase # => ISSO É UM TESTE DE FORMATAÇÃO
puts text.downcase # => isso é um teste de formatação
puts text.capitalize # => Isso é um teste de formatação
# Fancy formatting (good for titles)
puts text.as_title # => Isso É um Teste de Formatação
# Predicates
puts text.upcase.upcase? # => true
puts text.upcase.downcase? # => false
puts text.capitalize? # => true
Variations of a word (typos and misspelling)
require 'pascoale'
edits = Pascoale::Edits.new('você')
# 1 edit distance
puts edits.editions.inspect
# 2 edits distance
puts edits.editions2.inspect # LOTS of output, beware.
Syllabic separation *(Lowercase only)
require 'pascoale'
separator = Pascoale::SyllableSeparator.new('exceção')
puts separator.separated.inspect # => ["ex", "ce", "ção"]
separator = Pascoale::SyllableSeparator.new('aéreo')
puts separator.separated.inspect # => ["a", "é", "re", "o"]
separator = Pascoale::SyllableSeparator.new('apneia')
puts separator.separated.inspect # => ["ap", "nei", "a"]
separator = Pascoale::SyllableSeparator.new('construir')
puts separator.separated.inspect # => ["cons", "tru", "ir"]
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that pascoale demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.