High-precision stock ticker and company recognition for social media.
Project description
Stock Recognizer 📈
Introduction
A lightweight, hybrid Python library for extracting stock tickers and company names from messy social media text (Reddit, Twitter, etc.).
Table of Contents 🗂
Key Features 🔑
- Hybrid Engine: Combines Regex,
financedatabase(Market Data), and GLiNER2 (AI). - Context Aware: Distinguishes between "DD" (Due Diligence) and "DD" (DuPont).
- Yelling Protection: Smart filters for posts written in ALL CAPS.
- Auto-Mapping: Automatically converts "Apple" or "TSMC" to
AAPLandTSM.
Installation ⚙️
Installation can be done via pip:
pip install stock-recognizer
Usage ⌨️
from stock_recognizer import StockRecognizer
# Initialize (Market Data only for speed)
recognizer = StockRecognizer(use_ai=False)
text = "$PLAB DD: easy to understand TSMC supplier"
tickers = recognizer.recognize(text)
print(tickers) # ['PLAB'] (TSMC needs AI mapping)
# Initialize with AI for deep extraction
recognizer_ai = StockRecognizer(use_ai=True)
tickers_ai = recognizer_ai.recognize_ai(text)
print(tickers_ai) # ['PLAB', 'TSM']
Citation ✍️
If you use this project in your research, please cite as follows:
@misc{project_name,
author = {Stephan Akkerman},
title = {Stock Recognizer},
year = {2026},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/StephanAkkerman/stock-recognizer}}
}
Contributing 🛠
Contributions are welcome! If you have a feature request, bug report, or proposal for code refactoring, please feel free to open an issue on GitHub. We appreciate your help in improving this project.
License 📜
This project is licensed under the MIT License. See the LICENSE file for details.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stock_recognizer-0.1.1.tar.gz.
File metadata
- Download URL: stock_recognizer-0.1.1.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09a128017efd48137a5c86db952f86d3aff34a80ba08625f853028bc23a1302f
|
|
| MD5 |
ac3249746604aea5bf95f7266f507c3d
|
|
| BLAKE2b-256 |
4281b8e0c9b7c6c6db2b9dff549489a0e7a44a94ba0885cd0502c1c83ab7c96f
|
Provenance
The following attestation bundles were made for stock_recognizer-0.1.1.tar.gz:
Publisher:
publish.yml on StephanAkkerman/stock-recognizer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stock_recognizer-0.1.1.tar.gz -
Subject digest:
09a128017efd48137a5c86db952f86d3aff34a80ba08625f853028bc23a1302f - Sigstore transparency entry: 1508090633
- Sigstore integration time:
-
Permalink:
StephanAkkerman/stock-recognizer@5ea8f57a882fd8fccbb10638037bc2f37e5e3443 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/StephanAkkerman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5ea8f57a882fd8fccbb10638037bc2f37e5e3443 -
Trigger Event:
release
-
Statement type:
File details
Details for the file stock_recognizer-0.1.1-py3-none-any.whl.
File metadata
- Download URL: stock_recognizer-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b972aa892e6ff0a34ba98625aaf1bfee0a81bbb42e149f3cb83b872d854b84af
|
|
| MD5 |
9eaa63f407f9511a6caaa3658260ed67
|
|
| BLAKE2b-256 |
ca4848cef15235e3ca033e0cae580de45ffbd7c9ded2cfe28fdfeca686e330f6
|
Provenance
The following attestation bundles were made for stock_recognizer-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on StephanAkkerman/stock-recognizer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stock_recognizer-0.1.1-py3-none-any.whl -
Subject digest:
b972aa892e6ff0a34ba98625aaf1bfee0a81bbb42e149f3cb83b872d854b84af - Sigstore transparency entry: 1508090724
- Sigstore integration time:
-
Permalink:
StephanAkkerman/stock-recognizer@5ea8f57a882fd8fccbb10638037bc2f37e5e3443 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/StephanAkkerman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5ea8f57a882fd8fccbb10638037bc2f37e5e3443 -
Trigger Event:
release
-
Statement type: