-
Notifications
You must be signed in to change notification settings - Fork 0
docs: update README with detailed project features, structure #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,96 @@ | ||
# classifier | ||
# Classifier | ||
|
||
AI engine for classifying market sentiment, topics, and trustworthiness from raw data. | ||
AI engine for classifying market sentiment, topics, and trustworthiness from raw data using OpenAI and Redis. | ||
|
||
## Features | ||
|
||
- **Market Sentiment Analysis**: Classifies posts and data for positive, negative, or neutral sentiment. | ||
- **Topic Classification**: Identifies and groups posts by relevant topics. | ||
- **Trustworthiness Scoring**: Evaluates the reliability of content. | ||
- **OpenAI Integration**: Uses OpenAI models for advanced NLP tasks. | ||
- **Redis Support**: Caches and deduplicates processed data for efficiency. | ||
|
||
## Project Structure | ||
|
||
- `src/` — Main source code | ||
- `analyzeSentiment.ts` — Sentiment analysis logic | ||
- `classifyWithOpenAI.ts` — OpenAI classification integration | ||
- `completePostAnalysis.ts` — Full post analysis pipeline | ||
- `redisClient.ts`, `redisDedupeListener.ts` — Redis utilities | ||
- `lib/utils.ts` — Utility functions | ||
- `data/` — Sample and seed data | ||
- `run-classifier.ts` — Entry point for running the classifier | ||
|
||
## Getting Started | ||
|
||
### Prerequisites | ||
|
||
- Node.js (v18 or later recommended) | ||
- npm or yarn | ||
- Access to OpenAI API (API key required) | ||
- Redis server (for caching/deduplication) | ||
|
||
### Installation | ||
|
||
1. Clone the repository: | ||
```bash | ||
git clone https://github.com/Sentiopulse/classifier.git | ||
cd classifier | ||
``` | ||
2. Install dependencies: | ||
```bash | ||
npm install | ||
# or | ||
yarn install | ||
``` | ||
|
||
### Configuration | ||
|
||
Set your OpenAI API key and Redis connection details as environment variables: | ||
|
||
```bash | ||
export OPENAI_API_KEY=your_openai_api_key | ||
export REDIS_URL=redis://localhost:6379 | ||
``` | ||
|
||
You can also use a `.env` file with [dotenv](https://www.npmjs.com/package/dotenv) if preferred. | ||
|
||
### Usage | ||
|
||
To run the classifier on sample data: | ||
|
||
```bash | ||
npx ts-node run-classifier.ts | ||
``` | ||
|
||
Or build and run with Node.js: | ||
|
||
```bash | ||
npm run build | ||
node dist/run-classifier.js | ||
``` | ||
|
||
## Development | ||
|
||
- Source code is in TypeScript (`src/`) | ||
- Lint, test, and format code before submitting PRs | ||
|
||
### Scripts | ||
|
||
- `npm run build` — Compile TypeScript | ||
- `npm run lint` — Lint code | ||
- `npm test` — Run tests (if available) | ||
|
||
## Contributing | ||
|
||
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change. | ||
|
||
1. Fork the repo | ||
2. Create your feature branch (`git checkout -b feature/your-feature`) | ||
3. Commit your changes | ||
4. Push to the branch (`git push origin feature/your-feature`) | ||
5. Open a pull request | ||
|
||
## License | ||
|
||
See the [LICENSE](LICENSE) file for details. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace hard tabs with spaces in the fenced code blocks.
markdownlint
flags MD010 on these lines. Swap the leading tab characters for spaces so the snippets stay aligned without tripping the lint rule.🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
36-36: Hard tabs
Column: 1
(MD010, no-hard-tabs)
37-37: Hard tabs
Column: 1
(MD010, no-hard-tabs)
38-38: Hard tabs
Column: 1
(MD010, no-hard-tabs)
39-39: Hard tabs
Column: 1
(MD010, no-hard-tabs)
41-41: Hard tabs
Column: 1
(MD010, no-hard-tabs)
42-42: Hard tabs
Column: 1
(MD010, no-hard-tabs)
43-43: Hard tabs
Column: 1
(MD010, no-hard-tabs)
44-44: Hard tabs
Column: 1
(MD010, no-hard-tabs)
45-45: Hard tabs
Column: 1
(MD010, no-hard-tabs)
🤖 Prompt for AI Agents