{"id":13557537,"url":"https://github.com/IEMLdev/ieml","last_synced_at":"2025-04-03T11:32:25.880Z","repository":{"id":62570325,"uuid":"53596673","full_name":"IEMLdev/ieml","owner":"IEMLdev","description":"IEML semantic language - a meaning-representation system based on semantic primitives and a regular grammar. Basic semantic relationships between concepts are automatically computed from syntactic similarities.","archived":false,"fork":false,"pushed_at":"2021-03-08T23:00:17.000Z","size":8220,"stargazers_count":55,"open_issues_count":9,"forks_count":7,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-15T12:47:56.748Z","etag":null,"topics":["dictionary","ieml","language","meaning-representation","natural-language","semantic","semantic-relationships","topic","usl"],"latest_commit_sha":null,"homepage":"https://dev.intlekt.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IEMLdev.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":"2016-03-10T15:46:47.000Z","updated_at":"2024-12-25T17:08:56.000Z","dependencies_parsed_at":"2022-11-03T17:15:41.435Z","dependency_job_id":null,"html_url":"https://github.com/IEMLdev/ieml","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/IEMLdev%2Fieml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IEMLdev%2Fieml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IEMLdev%2Fieml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IEMLdev%2Fieml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IEMLdev","download_url":"https://codeload.github.com/IEMLdev/ieml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246993234,"owners_count":20865967,"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":["dictionary","ieml","language","meaning-representation","natural-language","semantic","semantic-relationships","topic","usl"],"created_at":"2024-08-01T12:04:24.439Z","updated_at":"2025-04-03T11:32:20.872Z","avatar_url":"https://github.com/IEMLdev.png","language":"Python","readme":"# IEML\n[![Build Status](https://travis-ci.org/IEMLdev/ieml.svg?branch=master)](https://travis-ci.org/IEMLdev/ieml)\n\nIEML is a regular philological language (built as a natural language), where the syntax is parallel to semantics. This means in IEML, a small change in the structure of an expression results in a semantically close expression.\nFor instance:\n - `[! E:S:. ()(u.A:.-) \u003e E:.l.- (E:.-U:.s.-l.-')]` : to go up\n - `[! E:S:. ()(u.A:.-) \u003e E:.l.- (E:.-U:.d.-l.-')]` : to go down\n \nOnly `E:.-U:.`**s**`.-l.-'` (up) has been changed to `E:.-U:.`**d**`.-l.-'` (down).\n\nThese properties make the semantic relationships between the different expressions of the language automatically computable by an edit distance calculation.\nTherefore, there are no synonyms in the language, because by construction, the synonyms would be written identically. On the other hand, words that are written differently in IEML have different meanings.\n\nSo IEML has the perfect capabilities to uniquely identify concepts in a database, an ontology, a taxonomy, a categorization or any other documents, without having to rely on an external referential other than IEML's grammar and its dictionary of semantic primitives. \n\nIn order to guarantee the consistency of interpretations of IEML expressions, a database of translations (en and fr), comments and tags per USL is available [here](https://github.com/IEMLdev/ieml-language \"IEML database\"). This database has a normative purpose concerning the interpretation of IEML expressions. It can be browsed with the [intlekt editor](https://dev.intlekt.io/ \"IEML editor\"). It can also be used as an educational resource for learning IEML, in addition to reading the [grammar](https://www.dropbox.com/s/875vsj0atbcts43/0-00-IEML-Manifesto-2019-fr.pdf?dl=0 \"IEML grammar\"). \n\nIEML is a regular language that is intended to serve as an easily interpretable coordinate system for the world of ideas on the internet, to improve communication and artificial intelligence.\n\n## Install\n\nThe library works with python 3.5+\nFrom github:\n```bash\ngit clone https://github.com/IEMLdev/ieml\npython setup.py\n```\n## Quick start\n\n### Dictionary\n\nThe IEML dictionary is a set of around ~3500 basic semantics units. \n\nThe dictionay has its own syntax and primitives. The dictionary is organised in layers, from 0 (the most abstract) to 7 (the most specific). The words excepts the primitives are built from words of lower layers.  \n\nThe last version of the IEML dictionary is automatically downloaded and installed when instanced:\n```python\nfrom ieml.dictionary import Dictionary\n\ndic = Dictionary()\ndic.index\n```\nThis return a list of all words defined in the dictionary.\nThere is an order defined on the terms of the dictionary, and d.index is the position of the words in this order.\n\nYou can access the translations of a word :\n ```python\nt = dic.index[100]\nt.translations.en\n```\nThere are for the moment two languages supported: french (fr) and english (en)\n\nThe dictionaryis a graph of semantic relationships (paradigmatic) between the words.\nAll the relations are computed automatically from the terms definitions.\n```python\nt.relations.neighbours\n```\nThis return a list of all the neighboors of term t and the type of relation they share.\n\nYou can also access the graph of relation as a numpy array of transitions :\n```python\nm = dic.relations_graph.connexity\n```\nReturn a dense numpy array of boolean where `m[i, j]` is true if there is a relation \nbetween the term number `i` and the term number `j`.\n```\nfrom ieml.dictionary import term\n\nt0 = term('wa.')\nt1 = term('we.')\nm[t0.index, t1.index]\n```\n\nThe `term` function with a string argument call the dictionary parser and\nreturn a Term if the string is a valid IEML expression of a term (defined in the dictionary).\n\n\n### Syntax\n\nA syntactic meaning unit is called an USL, for Uniform Semantic Locator. \nThere is five differents types of USL :\n - Word : the basic meaning constituent, you can find all the defined words in the [IEML dictionary](https://dictionary.ieml.io).  \n - Topic: a topic aggregate Words into a root and a flexing morphem, a topic represents a subject, a process. \n - Fact : a fact is a syntactic tree of topics, a fact symbolizes an event, a description.\n - Theory: a theory is a tree of facts, it represents a set of sentence linked together by causal, temporal, logic links etc. \n - Text: a text is a set of Topic, Fact and Theory.\n\nTo instantiate an usl, you can use the USL parser with the `usl` function\nwith a string argument.\n\n```python\nfrom ieml.grammar import usl\n\nusl('[([wa.])]') # topic with a single word\nusl(\"[([t.u.-s.u.-d.u.-']+[t.u.-b.u.-'])*([b.i.-])]\") # topic with two words in his root morphem and one in flexing \n```\n\nYou can also create an usl with constructors :\n```python\nfrom ieml.grammar import word, topic, fact, theory, text\n\nw = word('wa.')\nt0 = topic([w])\nt1 = topic(['wa.', 'e.'])\nt2 = topic(root=[\"t.u.-s.u.-d.u.-'\", \"t.u.-b.u.-'\"], \n           flexing=[\"b.i.-\"])\nf = fact([(t2, t0, t1)])\n\nt = text([t0, t1, t2, f])\n```\n\nFor any usls, you can access the words, topics, facts, theories and texts defined \nin the usl by accessing the dedicated property:\n\n```python\nt.words\nt.topics\nt.facts\nt.theories\nt.texts\n```\nEach of these properties returns a set of USLs of the specific type.\n\nFor any couple of usl, you can compute a semantic similarity measure based on the \nrelation matrix of the dictionary :\n```python\nfrom ieml.grammar.distance import dword\nfrom ieml.grammar.tools import random_usl\nu0 = random_usl(Topic)\nu1 = random_usl(Text)\n\ndword(u0, u1)\n```\n\nFor the moments, only a similarity using the words of the USL is defined.\n\n### Collection of USLs\nFor a list of USLs, you can compute a square matrix of relative order from each USLs :\n```python\nfrom ieml.distance.sort import square_order_matrix\n\nusl_list = [random_usl() for _ in range(100)]\n\nm = square_order_matrix(usl_list)\n\ni = 20\nordered_usls = [usl_list[k] for k in m[i, :]]\n```\nordered_usls is the list of usl ordered from USLs number i to the farrest USL from USL i in the collection.\nThis method use the semantic distance between words of the dictionary.\n\n### Contributors\nThis language is being made by the French philosopher [Pierre Levy](https://en.wikipedia.org/wiki/Pierre_L%C3%A9vy).\nThis library is being developped by [Louis van Beurden](https://louisvanbeurden.wordpress.com/).\n\n\n \n \n","funding_links":[],"categories":["Python","language"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIEMLdev%2Fieml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FIEMLdev%2Fieml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIEMLdev%2Fieml/lists"}