{"id":25005128,"url":"https://github.com/pymorphy2-fork/dawg-python","last_synced_at":"2026-03-06T12:04:11.678Z","repository":{"id":192423927,"uuid":"686738519","full_name":"pymorphy2-fork/DAWG-Python","owner":"pymorphy2-fork","description":"Pure-python reader for DAWGs created by dawgdic C++ library or DAWG Python extension. Fork of  https://github.com/pytries/DAWG-Python","archived":false,"fork":false,"pushed_at":"2026-03-01T17:32:17.000Z","size":4223,"stargazers_count":0,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-01T19:44:16.748Z","etag":null,"topics":["dawg"],"latest_commit_sha":null,"homepage":"","language":"Python","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/pymorphy2-fork.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-09-03T19:26:18.000Z","updated_at":"2026-03-01T17:32:14.000Z","dependencies_parsed_at":"2023-10-01T19:08:37.631Z","dependency_job_id":"2c273668-ca4c-48e4-81e9-ead93bf71922","html_url":"https://github.com/pymorphy2-fork/DAWG-Python","commit_stats":null,"previous_names":["pymorphy2-fork/dawg-python"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/pymorphy2-fork/DAWG-Python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pymorphy2-fork%2FDAWG-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pymorphy2-fork%2FDAWG-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pymorphy2-fork%2FDAWG-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pymorphy2-fork%2FDAWG-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pymorphy2-fork","download_url":"https://codeload.github.com/pymorphy2-fork/DAWG-Python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pymorphy2-fork%2FDAWG-Python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30175914,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T11:48:51.886Z","status":"ssl_error","status_checked_at":"2026-03-06T11:48:51.460Z","response_time":250,"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":["dawg"],"created_at":"2025-02-05T00:11:01.966Z","updated_at":"2026-03-06T12:04:06.660Z","avatar_url":"https://github.com/pymorphy2-fork.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DAWG2-Python\n\n[![Python tests](https://github.com/pymorphy2-fork/DAWG-Python/actions/workflows/python-tests.yml/badge.svg)](https://github.com/pymorphy2-fork/DAWG-Python/actions/workflows/python-tests.yml)\n[![Coverage Status](https://coveralls.io/repos/github/pymorphy2-fork/DAWG-Python/badge.svg?branch=master)](https://coveralls.io/github/pymorphy2-fork/DAWG-Python?branch=master)\n\nThis pure-python package provides read-only access for files created by\n[dawgdic][1] C++ library and\n[DAWG][2] python package.\n\nThis package is not capable of creating DAWGs. It works with DAWGs built\nby [dawgdic][1] C++ library or\n[DAWG][2] Python extension module. The main\npurpose of DAWG-Python is to provide access to DAWGs without\nrequiring compiled extensions. It is also quite fast under PyPy (see\nbenchmarks).\n\n# Installation\n\n```commandline\npip install DAWG2-Python\n```\n# Usage\n\nThe aim of DAWG2-Python is to be API- and binary-compatible with\n[DAWG][2] when it is possible.\n\nFirst, you have to create a dawg using\n[DAWG][2] module:\n\n```python\nimport dawg\n\nd = dawg.DAWG(data)\nd.save('words.dawg')\n```\nAnd then this dawg can be loaded without requiring C extensions:\n\n```python\nimport dawg_python\n\nd = dawg_python.DAWG().load('words.dawg')\n```\nPlease consult [DAWG][2] docs for detailed\nusage. Some features (like constructor parameters or `save` method) are\nintentionally unsupported.\n\n# Benchmarks\n\nBenchmark results (100k unicode words, integer values (lengths of the\nwords), PyPy 1.9, macbook air i5 1.8 Ghz):\n\n    dict __getitem__ (hits):        11.090M ops/sec\n    DAWG __getitem__ (hits):        not supported\n    BytesDAWG __getitem__ (hits):   0.493M ops/sec\n    RecordDAWG __getitem__ (hits):  0.376M ops/sec\n\n    dict get() (hits):              10.127M ops/sec\n    DAWG get() (hits):              not supported\n    BytesDAWG get() (hits):         0.481M ops/sec\n    RecordDAWG get() (hits):        0.402M ops/sec\n    dict get() (misses):            14.885M ops/sec\n    DAWG get() (misses):            not supported\n    BytesDAWG get() (misses):       1.259M ops/sec\n    RecordDAWG get() (misses):      1.337M ops/sec\n\n    dict __contains__ (hits):           11.100M ops/sec\n    DAWG __contains__ (hits):           1.317M ops/sec\n    BytesDAWG __contains__ (hits):      1.107M ops/sec\n    RecordDAWG __contains__ (hits):     1.095M ops/sec\n\n    dict __contains__ (misses):         10.567M ops/sec\n    DAWG __contains__ (misses):         1.902M ops/sec\n    BytesDAWG __contains__ (misses):    1.873M ops/sec\n    RecordDAWG __contains__ (misses):   1.862M ops/sec\n\n    dict items():           44.401 ops/sec\n    DAWG items():           not supported\n    BytesDAWG items():      3.226 ops/sec\n    RecordDAWG items():     2.987 ops/sec\n    dict keys():            426.250 ops/sec\n    DAWG keys():            not supported\n    BytesDAWG keys():       6.050 ops/sec\n    RecordDAWG keys():      6.363 ops/sec\n\n    DAWG.prefixes (hits):    0.756M ops/sec\n    DAWG.prefixes (mixed):   1.965M ops/sec\n    DAWG.prefixes (misses):  1.773M ops/sec\n\n    RecordDAWG.keys(prefix=\"xxx\"), avg_len(res)==415:       1.429K ops/sec\n    RecordDAWG.keys(prefix=\"xxxxx\"), avg_len(res)==17:      36.994K ops/sec\n    RecordDAWG.keys(prefix=\"xxxxxxxx\"), avg_len(res)==3:    121.897K ops/sec\n    RecordDAWG.keys(prefix=\"xxxxx..xx\"), avg_len(res)==1.4: 265.015K ops/sec\n    RecordDAWG.keys(prefix=\"xxx\"), NON_EXISTING:            2450.898K ops/sec\n\nUnder CPython expect it to be about 50x slower. Memory consumption of\nDAWG-Python should be the same as of\n[DAWG][2].\n\n# Current limitations\n\n- This package is not capable of creating DAWGs;\n- all the limitations of [DAWG][2] apply.\n\nContributions are welcome!\n\n# Contributing\n\n- Development happens at GitHub: \u003chttps://github.com/pymorphy2-fork/DAWG-Python\u003e\n- Issue tracker: \u003chttps://github.com/pymorphy2-fork/DAWG-Python/issues\u003e\n\nFeel free to submit ideas, bugs or pull requests.\n\n## Running tests and benchmarks\n\nMake sure [pytest][3] is installed and run\n\n```commandline\n$ pytest .\n```\nfrom the source checkout. Tests should pass under python 3.8, 3.9, 3.10, 3.11 and PyPy3 \\\u003e= 7.3.\n\nIn order to run benchmarks, type\n\n```commandline\n$ pypy3 -m bench.speed\n```\nThis runs benchmarks under PyPy (they are about 50x slower under\nCPython).\n\n## Authors \u0026 Contributors\n\n- Mikhail Korobov \\\u003ckmike84@gmail.com\\\u003e\n- [@bt2901](https://github.com/bt2901)\n- [@insolor](https://github.com/insolor)\n\nThe algorithms are from [dawgdic][1]\nC++ library by Susumu Yata \u0026 contributors.\n\n# License\n\nThis package is licensed under MIT License.\n\n[1]: https://code.google.com/p/dawgdic/\n[2]: https://github.com/pymorphy2-fork/DAWG\n[3]: https://docs.pytest.org/en/7.4.x/getting-started.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpymorphy2-fork%2Fdawg-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpymorphy2-fork%2Fdawg-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpymorphy2-fork%2Fdawg-python/lists"}