{"id":20114707,"url":"https://github.com/gatenlp/mimir-python","last_synced_at":"2025-10-19T14:46:34.352Z","repository":{"id":145771223,"uuid":"71894649","full_name":"GateNLP/mimir-python","owner":"GateNLP","description":"A client library for working with Mimir search in Python","archived":false,"fork":false,"pushed_at":"2017-06-01T16:08:25.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-01-13T06:10:43.218Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GateNLP.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-25T12:27:05.000Z","updated_at":"2016-10-25T13:01:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"aebee698-8c0d-4717-b4b1-c47340fdee6f","html_url":"https://github.com/GateNLP/mimir-python","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/GateNLP%2Fmimir-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GateNLP%2Fmimir-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GateNLP%2Fmimir-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GateNLP%2Fmimir-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GateNLP","download_url":"https://codeload.github.com/GateNLP/mimir-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241557194,"owners_count":19981881,"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-13T18:31:27.419Z","updated_at":"2025-10-19T14:46:29.301Z","avatar_url":"https://github.com/GateNLP.png","language":"Python","readme":"# mimir-python\n\nA client library for working with Mímir search in Python.\n\nSupports the Mímir API as described in [the documentation for mimir](https://gate.ac.uk/mimir/doc/mimir-guide.pdf).\n\nAlso adds context helpers to deal with initialising and removing queries, and iterators to allow for more pythonic use. \n\n```python\nfrom mimir_helpers import MimirHelper\n\n# Configuring the endpoint. Don't forget the trailing slash.\nhelper = MimirHelper(\"http://mymimirendpoint.example.com/search/\") \n\n# Issue a query manually.\nqueryId = helper.postQuery(\"{Token}\")\nhelper.wait(queryId) # Wait until the search is done.\nprint helper.documentsCount(queryId)\nprint helper.documentId(queryId, rank=0)\nhelper.close(queryId) # Politely tell the server we're done with this query.\n\n# Issue a query manually using the context manager\nwith helper.query(\"{Token}\") as resultSet:\n\tprint resultSet.documentsCount()\n\tprint resultSet.documentId(rank=0)\n\n# Iterate over the results from a query.\nwith helper.query(\"{Token}\") as resultSet:\n\tfor result in resultSet.results():\n\t\tprint result.text\n\t\tprint result.documentId\n\t\tprint result.hits\n\t\tprint result.metadata\n\t\tprint result.tokens\n```\n\nDepends on python requests library.\n\nHave fun!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgatenlp%2Fmimir-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgatenlp%2Fmimir-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgatenlp%2Fmimir-python/lists"}