{"id":19380836,"url":"https://github.com/somnathdevpro/lexiojs","last_synced_at":"2025-07-23T19:33:44.697Z","repository":{"id":258960651,"uuid":"868490647","full_name":"SomnathDevPro/LexioJS","owner":"SomnathDevPro","description":"LexioJS is a simple lightweight javascript library to perform NLP tasks with ease!","archived":false,"fork":false,"pushed_at":"2024-10-08T14:02:06.000Z","size":405,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-13T09:15:12.109Z","etag":null,"topics":["javascript-library","js","ml","nlp","nlpjs"],"latest_commit_sha":null,"homepage":"https://lexio-js.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SomnathDevPro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-10-06T14:17:34.000Z","updated_at":"2025-04-28T17:50:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"4b2a9ceb-400d-4a04-acdf-5e697fc45583","html_url":"https://github.com/SomnathDevPro/LexioJS","commit_stats":null,"previous_names":["somnathdevpro/lexiojs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SomnathDevPro/LexioJS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomnathDevPro%2FLexioJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomnathDevPro%2FLexioJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomnathDevPro%2FLexioJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomnathDevPro%2FLexioJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SomnathDevPro","download_url":"https://codeload.github.com/SomnathDevPro/LexioJS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomnathDevPro%2FLexioJS/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266738318,"owners_count":23976416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":["javascript-library","js","ml","nlp","nlpjs"],"created_at":"2024-11-10T09:14:57.736Z","updated_at":"2025-07-23T19:33:44.687Z","avatar_url":"https://github.com/SomnathDevPro.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LexioJS\nIntroducing LexioJS a lightweight(~7.60 kb minified) simple JavaScript library built with vanilla JS which provides you a lightning fast API for performing basic NLP tasks Such as:\n```\n  -Tokenization\n  -Text Processing \n  -Stop Word Removal\n  -sentiment analysis \n  -NER\n  -stemming\n  -lemmatization\n  -feature extraction\n```\n## Overview\n\nLexio.js is a JavaScript library for Natural Language Processing (NLP) tasks. It provides various classes and methods for text processing, sentiment analysis, named entity recognition, stemming, and lemmatization.\n\n\n## Classes\n\n\n### Lexio\n\n\n#### Description\n\nThe core class containing Tokenizer and StopWordRemover.\n\n\n#### Methods\n\n\n`Tokenizer`\n\n\n- `tokenize(text: string)`: Tokenizes the input text into individual words or tokens.\n- `removePunctuation(text: string)`: Removes punctuation from the input text.\n- `expandContractions(text: string)`: Expands contractions in the input text.\n\n\n`StopWordRemover`\n\n\n- `removeStopWords(tokens: array)`: Removes stopwords from the input tokens.\n\n\n### LexioSentimentAnalyzer\n\n\n#### Description\n\nAnalyzes sentiment of input text.\n\n\n#### Methods\n\n\n- `analyzeSentiment(text: string)`: Analyzes sentiment of the input text.\n    - Returns: \"positive\", \"negative\", or \"neutral\"\n\n\n### Lner (Named Entity Recognizer)\n\n\n#### Description\n\nIdentifies named entities in input text.\n\n\n#### Methods\n\n\n- `identifyEntities(text: string)`: Identifies named entities in the input text.\n    - Returns: An array of identified entities\n\n\n### LexioPorterStemmer\n\n\n#### Description\n\nStems input tokens.\n\n\n#### Methods\n\n\n- `stem(token: string)`: Stems the input token.\n    - Returns: The stemmed token\n\n\n### LexioLemmatizer\n\n\n#### Description\n\nLemmatizes input text.\n\n\n#### Methods\n\n\n- `lemmatize(text: string)`: Lemmatizes the input text.\n    - Returns: An array of lemmatized tokens\n\n### Lbow\n\n#### description \n\nextracts features from a text into a feature vector object,using bag of words\n\n#### methods\n\n- `createVocab(texts: array)`: creates an object containing the words in a document or list of sentences.\n- `createFeatureVector(text: string)`: creates an object of all the document in sentence and their occurrences \n\n## Usage\n\n\n#### Importing Lexio.js\nyou can use a CDN to include Lexio in directly in your project!\n```\n\u003cscript src=\"lexio-js.vercel.app/src/lexio.min.js\"\u003e\u003c/script\u003e\n```\n\n\n#### Tokenization\n\n```\nconst lexio = new Lexio();\nconst tokenizer = new lexio.Tokenizer();\nconst tokens = tokenizer.tokenize('This is an example sentence.');\nconsole.log(tokens); // Output: [\"This\", \"is\", \"an\", \"example\", \"sentence\"]\n```\n\n\n#### Sentiment Analysis\n\n```\nconst lexio = new Lexio();\nconst sentimentAnalyzer = new LexioSentimentAnalyzer();\nconst sentiment = sentimentAnalyzer.analyzeSentiment('I love this product!');\nconsole.log(sentiment); // Output: \"positive\"\n```\n\n\n#### Named Entity Recognition\n\n```\nconst lexio = new Lexio();\nconst ner = new Lner();\nconst entities = ner.identifyEntities('John Smith is a software engineer at Google.');\nconsole.log(entities); // Output: [{\"token\": \"John Smith\", \"type\": \"Person\"}, {\"token\": \"Google\", \"type\": \"Organization\"}]\n```\n\n\n#### Stemming\n\n```\nconst stemmer = new LexioPorterStemmer();\nconst stemmedToken = stemmer.stem('running');\nconsole.log(stemmedToken); // Output: \"run\"\n```\n\n\n#### Lemmatization\n\n```\nconst lemmatizer = new LexioLemmatizer();\nconst lemmatizedTokens = lemmatizer.lemmatize('The quick brown fox jumps over the lazy dog.');\nconsole.log(lemmatizedTokens); // Output: [\"The\", \"quick\", \"brown\", \"fox\", \"jump\", \"over\", \"the\", \"lazy\", \"dog\"]\n```\n\n\n## License\n\nLexio.js is licensed under the MIT License.\n\n\n## Contributing\n\n\nPull requests and issues are welcome!\n\nthanks for checking out my project 😊 \nplease give me a star if you liked...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomnathdevpro%2Flexiojs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsomnathdevpro%2Flexiojs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomnathdevpro%2Flexiojs/lists"}