{"id":15724456,"url":"https://github.com/cldellow/segmenter","last_synced_at":"2025-10-18T20:51:37.715Z","repository":{"id":57718229,"uuid":"165437717","full_name":"cldellow/segmenter","owner":"cldellow","description":"Segment short strings into words.","archived":false,"fork":false,"pushed_at":"2019-02-10T04:50:19.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T12:13:21.044Z","etag":null,"topics":["nlp"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/cldellow.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}},"created_at":"2019-01-12T21:28:49.000Z","updated_at":"2019-02-10T04:50:20.000Z","dependencies_parsed_at":"2022-09-14T22:41:32.102Z","dependency_job_id":null,"html_url":"https://github.com/cldellow/segmenter","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/cldellow%2Fsegmenter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldellow%2Fsegmenter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldellow%2Fsegmenter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldellow%2Fsegmenter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cldellow","download_url":"https://codeload.github.com/cldellow/segmenter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246399798,"owners_count":20770908,"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":["nlp"],"created_at":"2024-10-03T22:16:44.528Z","updated_at":"2025-10-18T20:51:37.618Z","avatar_url":"https://github.com/cldellow.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# segmenter\n\n[![Build Status](https://travis-ci.org/cldellow/segmenter.svg?branch=master)](https://travis-ci.org/cldellow/segmenter)\n[![codecov](https://codecov.io/gh/cldellow/segmenter/branch/master/graph/badge.svg)](https://codecov.io/gh/cldellow/segmenter)\n[![Maven Central](https://img.shields.io/maven-central/v/com.cldellow/segmenter.svg)](https://mvnrepository.com/artifact/com.cldellow/segmenter)\n\n\nSegment short strings into words.\n\n## Usage\n\nThe easiest way to get started is to create a map of word\nprobabilities:\n\n```\nHashMap\u003cString, Double\u003e probabilities = new HashMap\u003cString, Double\u003e();\nprobabilities.put(\"eats\", 0.2);\nprobabilities.put(\"at\", 0.2);\nprobabilities.put(\"eat\", 0.1);\nprobabilities.put(\"sat\", 0.1);\n\nSegmenter segmenter = new Segmenter(probabilities);\nResult result = segmenter.segment(\"eatsat\", 2, 2, 0);\n\nresult.getPhrase(0); // \"eats at\"\nresult.getPhrase(1); // \"eat sat\"\n```\n\nUnder the covers, the `Segmenter` converts the map into a trie. The\nconstruction step is slow, so you can also pass a constructed trie\n(perhaps deserialized from a previous construction) to speed up\nthat step.\n\nThe `Segmenter` class is thread-safe.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcldellow%2Fsegmenter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcldellow%2Fsegmenter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcldellow%2Fsegmenter/lists"}