{"id":15696609,"url":"https://github.com/tkellen/ruby-ngram","last_synced_at":"2025-05-08T21:16:48.393Z","repository":{"id":12472255,"uuid":"15139011","full_name":"tkellen/ruby-ngram","owner":"tkellen","description":"Break words and phrases into ngrams.","archived":false,"fork":false,"pushed_at":"2013-12-12T18:53:54.000Z","size":116,"stargazers_count":12,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-08T21:16:43.265Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/tkellen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-12T15:07:20.000Z","updated_at":"2023-03-03T10:00:45.000Z","dependencies_parsed_at":"2022-09-23T07:30:26.845Z","dependency_job_id":null,"html_url":"https://github.com/tkellen/ruby-ngram","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/tkellen%2Fruby-ngram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkellen%2Fruby-ngram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkellen%2Fruby-ngram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkellen%2Fruby-ngram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkellen","download_url":"https://codeload.github.com/tkellen/ruby-ngram/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253149621,"owners_count":21861740,"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-10-03T19:09:28.282Z","updated_at":"2025-05-08T21:16:48.367Z","avatar_url":"https://github.com/tkellen.png","language":"Ruby","funding_links":[],"categories":["NLP Pipeline Subtasks"],"sub_categories":["Phrasal Level Processing"],"readme":"# ngram [![Build Status](https://secure.travis-ci.org/tkellen/ruby-ngram.png?branch=master)](http://travis-ci.org/tkellen/ruby-ngram)\n\u003e Break words and phrases into ngrams.\n\n## Setup\n\n```console\ngem install ngram\n```\n\n## Usage\n\n```ruby\nrequire 'ngram'\n\n# these are default settings\nngram = NGram.new({\n  :size =\u003e 2,\n  :word_separator =\u003e \" \",\n  :padchar =\u003e \"_\"\n})\n# =\u003e #\u003cNGram:0x10d9877f0 @padchar=\"_\", @separator=\" \", @size=2\u003e\n\nngram.parse('test')\n# =\u003e [\"__\", \"_t\", \"te\", \"es\", \"st\", \"t_\", \"__\"]\nngram.parse('test phrase')\n# =\u003e [[\"_t\", \"te\", \"es\", \"st\", \"t_\"], [\"_p\", \"ph\", \"hr\", \"ra\", \"as\", \"se\", \"e_\"]]\n```\n\n\u003e Copyright (c) 2013 Tyler Kellen. See LICENSE for further details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkellen%2Fruby-ngram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkellen%2Fruby-ngram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkellen%2Fruby-ngram/lists"}