Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
This is a basic library used for NLP that can perform conversions between numbers in numerical format and alphabetical / character format.
pip install numericnormalizer
from numericnormalizer import normalizer
normalizer.number_to_word(5, lang='en')
>> "five"
normalizer.number_to_word(5, lang='zh')
>> "五"
normalizer.word_to_number('five', lang='en')
>> 5
normalizer.number_to_word('五', lang='zh')
>> 5
normalizer.format_sentence(
sentence='What are the 6 principles of intercultural adaption?',
lang='zh'
)
>> "What are the six (6) principles of intercultural adaption?"
normalizer.format_sentence(
sentence='I have 4 apples and five oranges.',
lang='zh',
formatting='{number} [{word}]', # custom formatting
)
>> "I have 4 [four] apples and 5 [five] oranges."
normalizer.format_sentence(
sentence='I have 4 apples and five oranges.',
lang='zh',
max_number=4 # restrict the max_number
)
>> "I have four (4) apples and five oranges."
The supported languages are from the Azure Language Detect List:
However for the format_sentence
feature, as this is an early release not all languages have been tested thoroughly. It is currently designed to only check languages that deal with spaces as it relies on regex word match notation
Currently only support numbers 0 - 10. No negatives.
FAQs
Converting number formats
We found that numericnormalizer demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.