{"id":19457630,"url":"https://github.com/mgproduction/word2neighborhood","last_synced_at":"2025-07-06T11:34:56.827Z","repository":{"id":79204847,"uuid":"109612687","full_name":"MGProduction/word2neighborhood","owner":"MGProduction","description":"A simple tool to create dictionary and context data (aka a Neighborhood, aka a Context Vector-like structure) from a corpus file.","archived":false,"fork":false,"pushed_at":"2017-11-09T22:08:20.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-08T01:47:50.557Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MGProduction.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2017-11-05T20:15:01.000Z","updated_at":"2017-11-05T20:27:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"72ffd99e-dca6-4a43-ab1e-7a5ebbec6adb","html_url":"https://github.com/MGProduction/word2neighborhood","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MGProduction%2Fword2neighborhood","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MGProduction%2Fword2neighborhood/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MGProduction%2Fword2neighborhood/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MGProduction%2Fword2neighborhood/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MGProduction","download_url":"https://codeload.github.com/MGProduction/word2neighborhood/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240662325,"owners_count":19837366,"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","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":[],"created_at":"2024-11-10T17:23:13.914Z","updated_at":"2025-02-25T11:40:50.830Z","avatar_url":"https://github.com/MGProduction.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"Word2Neighborhood\n====\n\n`Word2Neighborhood` is a simple tool to create dictionary and context data (aka a Neighborhood, aka a Context Vector-like structure) from a corpus file.\n\nIf you use this software, please cite:\n* [Marco Giorgini](http://www.marcogiorgini.com)\n\nThe source code in this repository is provided under the terms of the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).\n\n## Information\n\n`Word2Neighborhood` builds dictionary/neighborhood files from a single corpus file.\n`Corpus file` can be a normal text file, or a `CoNLL-U` file, ANSI or UTF-8.\n\nWhen creating a dictionary from a corpus file it's possible to use a stopword list and/or standard filters (skip words with just digits or punctuations) and/or a filter based on POS (if you work with CoNLL-U files). You can also ask to add bigrams in the dictionary (that will be used, if found, for context extraction).\n\nIt's possible to specify a custom radius form context extraction and/or to select the desired size for Neighborhood dimension.\n\nDictionary file is created with TFxIDF for each element and it has an automatic cut for unprobable items.\n\n## Compiling and using `Word2Neighborhood`\n\n`Word2Neighborhood` is a single C source file, and it should be compiled by any standard C99 compiler.\n\nTo create a dictionary from a corpus:\n\n    Word2Neighborhood -corpus \u003ccorpusfile\u003e -create dictionary -dict dictionary.txt -stop stopwords.txt\n\nTo create a neighborhood file from a corpus (using an already created dictionary file):\n\t\n\tWord2Neighborhood -corpus \u003ccorpusfile\u003e -create neighborhood -neighbors neighbors.txt -dict dictionary.txt \n\n## Acknowledgements\n\nThis tool is somehow inspired by `Word2Vec` but it doesn't use neural networks to create a compact way to store/recall data. \nIt instead uses a mix between a normal and an associative array and it's able to extract context from a multi-GB file, for multimillion words dictionary, using relatively few memory and with a relatively high speed.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgproduction%2Fword2neighborhood","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgproduction%2Fword2neighborhood","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgproduction%2Fword2neighborhood/lists"}