A Transformer-based SocialNLP toolkit for Farcaster
Project description
FarGlot
A Transformer-based SocialNLP toolkit for Farcaster.
Installation
pip install farglot
Examples
from farglot import CastAnalyzer
sentiment_analyzer=CastAnalyzer.sequence_analzyer_from_model_name(
hub_address="nemes.farcaster.xyz:2283",
model_name="pysentimiento/robertuito-sentiment-analysis"
)
sentiment_analyzer.predict_cast(fid=2, hash_hex="0x0bcdcbf006ec22b79f37f2cf2a09c33413883937")
# ...
sentiment_analyzer.predict_casts_by_fid(fid=2)
# [...]
Generate a Training Set from a Hub
Install the FarGlot CLI
pip install farglot[cli]
Define Training Set Columns
{
"name": "labels",
"default_value": 1 // optional
}
For multilabel classfication:
[
{
"name": "column_one",
"default_value": 1 // optional
},
{
"name": "column_two",
"default_value": 2 // optional
},
{
"name": "column_three",
"default_value": 3 // optional
}
]
Usage
farglot init
farglot set-columns-path /path/to/column_configs.json
farglot set-hub-db-path /path/to/.rocks/rocks.hub._default
farglot new-training-set --out ./data/training-set.csv
This largely is largely adapted off of pysentimiento.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
farglot-0.1.1.tar.gz
(31.5 kB
view details)
Built Distribution
farglot-0.1.1-py3-none-any.whl
(48.8 kB
view details)
File details
Details for the file farglot-0.1.1.tar.gz
.
File metadata
- Download URL: farglot-0.1.1.tar.gz
- Upload date:
- Size: 31.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.15 CPython/3.8.12 Darwin/22.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18c29d18a67dfc877e73c3d68ff68004e805372ba726e1ad5494989de4c5a014 |
|
MD5 | 9e992a3bfa8e0d98fbc73ac7555b1dfb |
|
BLAKE2b-256 | 2f9e2bf149f695989182936f014f3db85a9ab4d4c383d93ceb22a8c03ae38abc |
File details
Details for the file farglot-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: farglot-0.1.1-py3-none-any.whl
- Upload date:
- Size: 48.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.15 CPython/3.8.12 Darwin/22.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75a913b44b277fb8b22d15f2d52411f5a38aee7639b14b961c00f8a6be5dcd3d |
|
MD5 | 044010d7f3d65203d2cf1366ab339c80 |
|
BLAKE2b-256 | 48fbe05a99f907bfc0a293d410cf2da6d80a6bb1a6ff7eeecfe7eb20d8ef67d0 |