{"id":37070790,"url":"https://github.com/chigwell/socialtextlytics","last_synced_at":"2026-01-14T08:16:10.470Z","repository":{"id":329743525,"uuid":"1120550624","full_name":"chigwell/socialtextlytics","owner":"chigwell","description":"A new package that analyzes social media post text to extract structured insights about audience engagement patterns, such as identifying common themes in highly liked content or predicting potential ","archived":false,"fork":false,"pushed_at":"2025-12-21T13:10:37.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-23T04:43:19.148Z","etag":null,"topics":["audience-engagement","categorized-feedback","comment-analysis","content-insights","description-analysis","engagement-patterns","highly-liked-content","post-language-analysis","predictive-analytics","social-media-analysis","structured-insights","subscriber-growth","text-analysis","text-processing","theme-identification"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/socialtextlytics/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chigwell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-21T13:10:29.000Z","updated_at":"2025-12-21T13:10:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/chigwell/socialtextlytics","commit_stats":null,"previous_names":["chigwell/socialtextlytics"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/chigwell/socialtextlytics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chigwell%2Fsocialtextlytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chigwell%2Fsocialtextlytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chigwell%2Fsocialtextlytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chigwell%2Fsocialtextlytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chigwell","download_url":"https://codeload.github.com/chigwell/socialtextlytics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chigwell%2Fsocialtextlytics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413743,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audience-engagement","categorized-feedback","comment-analysis","content-insights","description-analysis","engagement-patterns","highly-liked-content","post-language-analysis","predictive-analytics","social-media-analysis","structured-insights","subscriber-growth","text-analysis","text-processing","theme-identification"],"created_at":"2026-01-14T08:16:09.696Z","updated_at":"2026-01-14T08:16:10.456Z","avatar_url":"https://github.com/chigwell.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# socialtextlytics\n[![PyPI version](https://badge.fury.io/py/socialtextlytics.svg)](https://badge.fury.io/py/socialtextlytics)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n[![Downloads](https://static.pepy.tech/badge/socialtextlytics)](https://pepy.tech/project/socialtextlytics)\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-blue)](https://www.linkedin.com/in/eugene-evstafev-716669181/)\n\n\n**socialtextlytics** is a Python package that analyzes social‑media post text and returns structured insights about audience engagement patterns. It can identify common themes in highly liked content, suggest language that may drive subscriber growth, and more—without handling media files directly.\n\n## Features\n\n- Extracts categorized feedback from post text, comments, or descriptions.  \n- Uses a powerful LLM (ChatLLM7 by default) with regex‑based extraction for reliable outputs.  \n- Easily replace the LLM with any LangChain‑compatible model (OpenAI, Anthropic, Google, etc.).  \n- Simple, typed API.\n\n## Installation\n\n```bash\npip install socialtextlytics\n```\n\n## Quick Start\n\n```python\nfrom socialtextlytics import socialtextlytics\n\n# Example social‑media post text\nuser_input = \"\"\"\nJust launched our new feature! 🎉 10k likes already.\nWhat do you think? #innovation #tech\n\"\"\"\n\n# Call the analyzer with default LLM (ChatLLM7)\nresults = socialtextlytics(user_input)\n\nprint(results)\n# → ['...extracted insight strings...']\n```\n\n## Advanced Usage – Providing Your Own LLM\n\nIf you prefer to use a different language model, pass a LangChain `BaseChatModel` instance:\n\n### OpenAI\n\n```python\nfrom langchain_openai import ChatOpenAI\nfrom socialtextlytics import socialtextlytics\n\nllm = ChatOpenAI()          # configure with your OpenAI key as usual\nresponse = socialtextlytics(user_input, llm=llm)\nprint(response)\n```\n\n### Anthropic\n\n```python\nfrom langchain_anthropic import ChatAnthropic\nfrom socialtextlytics import socialtextlytics\n\nllm = ChatAnthropic()\nresponse = socialtextlytics(user_input, llm=llm)\nprint(response)\n```\n\n### Google Generative AI\n\n```python\nfrom langchain_google_genai import ChatGoogleGenerativeAI\nfrom socialtextlytics import socialtextlytics\n\nllm = ChatGoogleGenerativeAI()\nresponse = socialtextlytics(user_input, llm=llm)\nprint(response)\n```\n\n## Parameters\n\n| Name        | Type                     | Description |\n|-------------|--------------------------|-------------|\n| `user_input`| `str`                    | The text to analyze (post, comment, description, etc.). |\n| `llm`       | `Optional[BaseChatModel]`| A LangChain LLM instance. If omitted, the package creates a default **ChatLLM7** instance. |\n| `api_key`   | `Optional[str]`         | API key for ChatLLM7. If not supplied, the function reads `LLM7_API_KEY` from the environment. |\n\n### Default LLM – ChatLLM7\n\nWhen no `llm` is given, `socialtextlytics` creates a `ChatLLM7` instance:\n\n```python\nfrom langchain_llm7 import ChatLLM7\nresolved_llm = ChatLLM7(\n    api_key=api_key,\n    base_url=\"https://...\"\n)\n```\n\n*ChatLLM7* is available on PyPI: \u003chttps://pypi.org/project/langchain-llm7/\u003e (link provided in the source).  \nThe free tier’s rate limits are sufficient for typical usage. For higher limits, supply your own API key via the `LLM7_API_KEY` environment variable or the `api_key` argument.\n\nYou can obtain a free API key by registering at \u003chttps://token.llm7.io/\u003e.\n\n## How It Works\n\n1. **Prompt Construction** – The package builds system and human prompts (`system_prompt`, `human_prompt`).  \n2. **LLM Call** – The LLM processes the prompts and returns a raw response.  \n3. **Regex Extraction** – `llmatch` validates the response against a predefined regular expression (`pattern`) and extracts the structured data.  \n4. **Result** – A list of extracted insight strings is returned, or an empty list on failure.\n\n## Error Handling\n\nIf the LLM call fails or the response does not match the expected pattern, a `RuntimeError` is raised with an informative message.\n\n## Contributing \u0026 Issues\n\nBug reports, feature requests, and pull requests are welcome! Please open an issue at: \u003chttps://github.com/chigwell/socialtextlytics/issues\u003e\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Author\n\n**Eugene Evstafev**  \nEmail: \u003chi@euegne.plus\u003e  \nGitHub: \u003chttps://github.com/chigwell\u003e\n\n---\n\n*Enjoy extracting insights from your social media content with **socialtextlytics**!*","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchigwell%2Fsocialtextlytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchigwell%2Fsocialtextlytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchigwell%2Fsocialtextlytics/lists"}