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.
############################## VHash: Vectorizing Hash Tables ##############################
If you have documents with class labels, and you want to create numeric representations of those documents that maximize inter-class differences, then this package is for you. This package provides vectorizing hash tables that quickly transform your text, optimizing for the maximum distance between document-class vectors.
This project has a C++ backend with a python interface, allowing for maximum speed and maximum interopability.
Installation
To install, use :code:pip
:
.. code-block:: bash
pip install vhash
Minimum Working Example
This package follows the conventions of :code:scikit-learn
to provide an
intuitive and familiar interface.
.. code-block:: python
from typing import Any
from nptyping import NDArray
from vhash import VHash
# sample documents: each item in the list is its own document
docs = [
'hi, my name is Mike',
'hi, my name is George',
'hello, my name is Mike',
]
# class labels for each document
labels = [1, 0, 1]
# create & train model
vhash = VHash().fit(docs, labels)
# create numeric representation (2D float array)
numeric: NDArray[(Any, Any), float] = vhash.transform(docs)
Metrics
To see how this text transformer compares to BERT, check out the
sample notebook <https://github.com/lakes-legendaries/vhash/blob/main/stats/bert.ipynb>
_,
where we show how :code:vhash
outperforms :code:sBERT
on a sentiment analysis task.
.. docs-links
Documentation
To get started, check out the docs <https://lakes-legendaries.github.io/vhash/>
_!
If you will be contributing to this repo, checkout the
developer guide <https://lakes-legendaries.github.io/vhash/dev.html>
_.
FAQs
hash tables for vectorizing text-based documents
We found that vhash 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.