{"id":17521829,"url":"https://github.com/loehnertz/semantic-coupling","last_synced_at":"2025-03-29T00:14:51.327Z","repository":{"id":37263396,"uuid":"189048030","full_name":"loehnertz/semantic-coupling","owner":"loehnertz","description":"A library to compute the semantic coupling between source code files","archived":false,"fork":false,"pushed_at":"2022-06-20T22:41:34.000Z","size":69,"stargazers_count":0,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-04T15:52:50.447Z","etag":null,"topics":["kotlin","nlp","semantic-analysis","semantic-coupling","semantic-similarity"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loehnertz.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":"2019-05-28T14:47:19.000Z","updated_at":"2020-04-25T14:08:05.000Z","dependencies_parsed_at":"2022-09-03T17:40:51.452Z","dependency_job_id":null,"html_url":"https://github.com/loehnertz/semantic-coupling","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loehnertz%2Fsemantic-coupling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loehnertz%2Fsemantic-coupling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loehnertz%2Fsemantic-coupling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loehnertz%2Fsemantic-coupling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loehnertz","download_url":"https://codeload.github.com/loehnertz/semantic-coupling/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246117762,"owners_count":20726069,"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":["kotlin","nlp","semantic-analysis","semantic-coupling","semantic-similarity"],"created_at":"2024-10-20T12:07:05.857Z","updated_at":"2025-03-29T00:14:51.311Z","avatar_url":"https://github.com/loehnertz.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![](https://jitpack.io/v/loehnertz/semantic-coupling.svg)](https://jitpack.io/#loehnertz/semantic-coupling)\n\n# semantic-coupling\nA library to compute the semantic coupling between source code files (e.g. classes)\n\n## Participation\n**The library currently only supports source code written in Java and the English language.**\nI am very happy to pull other sets of programming and natural languages into this library, just open a PR for them.\n\n## Usage\n- Add this library to your own project: https://jitpack.io/#loehnertz/semantic-coupling/rc4\n- If you are using Kotlin as well, just go ahead and instantiate the main class:\n   ```\n   val files: List\u003cFile\u003e = retrieveFiles()\n   val fileContentsMap: Map\u003cString, String\u003e = files.map { convertFileNameToIdentifier(it.absolutePath) to it.readText() }.toMap()  // A map of file name to raw file contents\n   val semanticCouplingCalculator = SemanticCouplingCalculator(\n       files = fileContentsMap,\n       programmingLanguage = ProgrammingLanguage.JAVA,\n       naturalLanguage = NaturalLanguage.EN\n   )\n   val semanticCouplings: List\u003cSemanticCoupling\u003e = semanticCouplingCalculator.calculate()\n   ```\n- If you are using Java, you can do pretty much the same:\n    ```\n    SemanticCouplingCalculator semanticCouplingCalculator = new SemanticCouplingCalculator(fileContentsMap, ProgrammingLanguage.JAVA, NaturalLanguage.EN);\n    List\u003cSemanticCoupling\u003e semanticCouplings = semanticCouplingCalculator.calculate();\n    ```\n\nIf you have any further questions, just open an issue or send me an e-mail.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floehnertz%2Fsemantic-coupling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floehnertz%2Fsemantic-coupling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floehnertz%2Fsemantic-coupling/lists"}