{"id":18431352,"url":"https://github.com/mpds-io/optimade-mpds-nlp","last_synced_at":"2025-04-07T18:32:43.872Z","repository":{"id":57315810,"uuid":"458238279","full_name":"mpds-io/optimade-mpds-nlp","owner":"mpds-io","description":"Free-form search terms translation into the Optimade query language","archived":false,"fork":false,"pushed_at":"2023-09-22T23:06:09.000Z","size":64,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-11-02T13:02:29.989Z","etag":null,"topics":["optimade","optimade-api","optimade-specification"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/mpds-io.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}},"created_at":"2022-02-11T15:22:23.000Z","updated_at":"2022-11-23T18:59:43.000Z","dependencies_parsed_at":"2023-01-31T17:46:10.655Z","dependency_job_id":"3ea5e81b-ef76-4cbe-b02d-44f53f29fcc8","html_url":"https://github.com/mpds-io/optimade-mpds-nlp","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"360b94d8b8cb34ff4de0f0a035c37109f8173e38"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpds-io%2Foptimade-mpds-nlp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpds-io%2Foptimade-mpds-nlp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpds-io%2Foptimade-mpds-nlp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpds-io%2Foptimade-mpds-nlp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mpds-io","download_url":"https://codeload.github.com/mpds-io/optimade-mpds-nlp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223288518,"owners_count":17120405,"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":["optimade","optimade-api","optimade-specification"],"created_at":"2024-11-06T05:24:28.545Z","updated_at":"2024-11-06T05:24:28.963Z","avatar_url":"https://github.com/mpds-io.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"MPDS-based NLP for Optimade\n==========\n\n[![NPM version](https://img.shields.io/npm/v/optimade-mpds-nlp.svg?style=flat)](https://www.npmjs.com/package/optimade-mpds-nlp)\n[![NPM downloads](https://img.shields.io/npm/dm/optimade-mpds-nlp.svg?style=flat)](https://www.npmjs.com/package/optimade-mpds-nlp)\n[![GitHub issues](https://img.shields.io/github/issues/mpds-io/optimade-mpds-nlp?style=flat)](https://github.com/mpds-io/optimade-mpds-nlp/issues)\n\nThis is the early version of the JavaScript utilities for parsing an arbitrary string (ideally, in the natural language) into the [Optimade filter query](https://github.com/Materials-Consortia/OPTIMADE/blob/master/optimade.rst#appendices). An intermediate layer is the MPDS search query object notation, see the [MPDS platform](https://mpds.io) and its [API documentation](https://mpds.io/developer/#Categories).\n\nTo see how it works, try to paste an example string\n\n`cubic, disordered perovskites with actinides and chlorine`\n\ninto the main search field of the MPDS, and it will be correctly recognized and assigned to the following classes:\n\n```\n{\n    \"elements\": \"Cl\",\n    \"classes\": \"disordered, perovskite, actinoid\",\n    \"lattices\": \"cubic\"\n}\n```\n\nUsed by:\n\n- [MPDS GUI](https://github.com/mpds-io/ermac)\n- [Optimade.Science](https://github.com/tilde-lab/optimade.science)\n- [Project Metis GUI](https://github.com/basf/metis-gui)\n- _etc._\n\n\n## Installation\n\n```sh\nnpm i optimade-mpds-nlp --save\n```\n\n\n## Usage\n\nThe code is fully isomorphic and standalone. The following MPDS categories (out of 15) can be currently detected in a free-form text:\n\n- chemical _formulae_ (standard and anonymous)\n- chemical _elements_\n- crystalline _lattices_\n- physical _properties_ (see [MPDS hierarchy](https://mpds.io/hierarchy))\n- materials _classes_ (an umbrella term for [different various classifications](https://mpds.io/tutorial/#Classes))\n\nThe algorithm is mostly heuristic, which means it may or may not work for your particular keywords.\n\nOne has to import the only class from the module, instantiate, and use the `guess` method:\n\n```\nconst converter = NLP();\nconst mpds_query = converter.guess(input_str);\n```\n\nThe following Optimade query keywords can be currently obtained calling `converter.to_optimade(mpds_query)`:\n\n- `chemical_formula_anonymous`\n- `chemical_formula_reduced`\n- `elements HAS ALL \"...\"`\n- `nelements=...`\n\nThere might be some other MPDS-specific Optimade keywords with the `_mpds_` prefix implemented, being not the part of the Optimade standard though.\n\n\n## License\n\nMIT \u0026copy; Tilde Materials Informatics and Materials Platform for Data Science\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpds-io%2Foptimade-mpds-nlp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpds-io%2Foptimade-mpds-nlp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpds-io%2Foptimade-mpds-nlp/lists"}