{"id":17044384,"url":"https://github.com/srush/pydecode","last_synced_at":"2025-04-12T15:12:38.597Z","repository":{"id":62579818,"uuid":"12929894","full_name":"srush/PyDecode","owner":"srush","description":"A dynamic programming toolkit.","archived":false,"fork":false,"pushed_at":"2014-10-17T18:50:33.000Z","size":120076,"stargazers_count":39,"open_issues_count":2,"forks_count":7,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-12T15:12:23.696Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.pydecode.org","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/srush.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-18T17:40:23.000Z","updated_at":"2024-02-04T03:55:38.000Z","dependencies_parsed_at":"2022-11-03T21:01:17.665Z","dependency_job_id":null,"html_url":"https://github.com/srush/PyDecode","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srush%2FPyDecode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srush%2FPyDecode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srush%2FPyDecode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srush%2FPyDecode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srush","download_url":"https://codeload.github.com/srush/PyDecode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586245,"owners_count":21128998,"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-14T09:34:11.956Z","updated_at":"2025-04-12T15:12:38.572Z","avatar_url":"https://github.com/srush.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nPyDecode is a dynamic programming toolkit developed for research in natural langauge processing. Its aim is to be simple enough for fast prototyping, but efficient enough for research use.\n\n\n.. _documentation: http://pydecode.readthedocs.org/\n\n\n.. image:: _images/parsing_9_0.png\n   :width: 500 px\n   :align: center\n\n|\n|\n\n\nFeatures\n--------\n\n* **Simple specifications.** Dynamic programming algorithms specified through pseudo-code. ::\n\n    # Viterbi algorithm.\n    ...\n    c.init(items[0, :])\n    for i in range(1, n):\n        for t in range(len(tags)):\n            c.set(items[i, t],\n                  items[i-1, :],\n                  labels=labels[i, t, :])\n    graph = c.finish()\n\n* **Efficient implementation.** Core code in C++, python interfaces through numpy. ::\n\n    # Compute path.\n    label_weights = numpy.random.random(graph.label_size)\n    weights = pydecode.transform_label_array(graph, label_weights)\n    path = pydecode.best_path(graph, weights)\n\n* **High-level algorithms.** Includes a set of widely-used algorithms. ::\n\n    # Inside probabilities.\n    inside = pydecode.inside(graph, weights, kind=pydecode.LogProb)\n\n    # (Max)-marginals.\n    marginals = pydecode.marginals(graph, weights)\n\n    # Pruning\n    mask = marginals \u003e threshold\n    pruned_graph = pydecode.filter(graph, mask)\n\n* **Integration with machine learning toolkits.** Train structured models. ::\n\n    # Train a discriminative tagger.\n    perceptron_tagger = StructuredPerceptron(tagger)\n    perceptron_tagger.fit(X, Y)\n    Y_test = perceptron_tagger.predict(X_test)\n\n* **Visualization tools.**  IPython integrated tools for debugging and teaching. ::\n\n    pydecode.draw(graph, paths=paths)\n\n.. image:: _images/hmm.png\n   :width: 500 px\n   :align: center\n\n\n.. Documentation, Tutorial and Gallery\n.. ----------------------\n\n.. .. hlist::\n..    :columns: 2\n\n..    * documentation_\n..    * tutorial_\n..    * gallery_\n..    * api_\n\n\n.. Features\n.. -------------\n\n.. Currently the toolkit is in development. It includes the following features:\n\n.. * Simple construction of dynamic programs.\n.. * Customizable GraphViz output for debugging.\n.. * Algorithms for best path, inside scores, outside scores, and oracle scores.\n.. * Several types of pruning.\n.. * Integration with an (I)LP solver for constrained problems.\n.. * Lagrangian Relaxation optimization tools.\n.. * Semiring operations over hypergraph structures.\n.. * Hooks into PyStruct for structured training.\n.. * Fast k-best algorithms.\n\n\n.. .. image:: https://travis-ci.org/srush/PyDecode.png?branch=master\n..     :target: https://travis-ci.org/srush/PyDecode\n\n.. _gallery: http://pydecode.readthedocs.org/en/latest/notebooks/index.html\n.. _tutorial: http://pydecode.readthedocs.org/en/latest/notebooks/index.html\n.. _api: http://pydecode.readthedocs.org/en/latest/api.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrush%2Fpydecode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrush%2Fpydecode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrush%2Fpydecode/lists"}