{"id":20948393,"url":"https://github.com/yuanuo/dictionary-api","last_synced_at":"2025-09-08T09:39:34.528Z","repository":{"id":44053329,"uuid":"511912246","full_name":"Yuanuo/dictionary-api","owner":"Yuanuo","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-16T06:37:46.000Z","size":121,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-19T22:17:35.683Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/Yuanuo.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-08T13:51:42.000Z","updated_at":"2024-05-16T06:37:50.000Z","dependencies_parsed_at":"2023-11-27T18:26:01.056Z","dependency_job_id":"4eb6d2ee-55db-4fa2-934d-881e264185ad","html_url":"https://github.com/Yuanuo/dictionary-api","commit_stats":null,"previous_names":["yuanuo/dictionary-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yuanuo%2Fdictionary-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yuanuo%2Fdictionary-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yuanuo%2Fdictionary-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yuanuo%2Fdictionary-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yuanuo","download_url":"https://codeload.github.com/Yuanuo/dictionary-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243345570,"owners_count":20275869,"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-19T00:18:16.267Z","updated_at":"2025-03-13T04:44:04.404Z","avatar_url":"https://github.com/Yuanuo.png","language":"Java","readme":"# AppXI Dictionary\n## 自用的、易用的，高性能的词典实现方案！\n\n## 简易API使用方法：\n\n```java\nimport java.nio.file.Path;\nimport java.util.List;\n\npublic class DictionaryTest {\n    public static void main(String[] args) {\n        // 加载词典库\n        Dictionaries.discover(Path.of(\"repo\"));\n\n        // 列出默认的词典库列表\n        Dictionaries.list().forEach(System.out::println);\n\n        // 根据词典ID获取词条实例\n        Dictionary dictionary = Dictionaries.get(\"佛学辞典汇集\");\n        System.out.println(dictionary.size());\n\n        // 列表该词典实例的所有词条（名称）\n        dictionary.forEach(entry -\u003e System.out.println(entry.name()));\n\n        // 列出该词典实例的所有词条（名称和内容）\n        dictionary.forEach(entry -\u003e {\n            // 忽略非真实词条的目录\n            if (entry.isCategory()) {\n                return;\n            }\n\n            System.out.println(entry.name()); // 显示词条名称\n            System.out.println(entry.contentText()); // 显示词条内容（原始）\n            System.out.println(DictionaryHelper.toTextDocument(entry)); // 显示用于最终展示的词条内容（TEXT）\n            System.out.println(DictionaryHelper.toHtmlDocument(entry)); // 显示用于最终展示的词条内容（HTML，内置图片将以base64码嵌入img标签）\n        });\n\n        // 在\"所有\"词典中查询\n        // 查询以“三毒”字样开始的词条\n        Dictionaries.search(\"三毒\");\n        // 查询以“三毒”字样开始的词条\n        Dictionaries.search(\"三毒*\");\n        // 查询以“三毒”字样结尾的词条\n        Dictionaries.search(\"*三毒\");\n        // 查询存在“三毒”字样的词条\n        Dictionaries.search(\"*三毒*\");\n        // 精确查询词条名称为“三毒”的词条\n        Dictionaries.search(\"\\\"三毒\\\"\");\n        //\n\n        // 在\"单一\"词典中查询\n        // Dictionaries.getDictionary(\"佛学辞典汇集\").search(\"三毒\", ...)\n\n        // 在\"某些\"词典中查询\n        Dictionaries.search(\"三毒\", dict -\u003e List.of(\"id1\", \"id2\", \"id3\").contains(dict.id));\n\n        // 列出查询结果\n        Dictionaries.get(\"佛学辞典汇集\").search(\"三毒\").forEachRemaining(entry -\u003e {\n            System.out.println(entry.name()); // 显示词条名称\n            System.out.println(entry.contentText()); // 显示词条内容（原始）\n        });\n    }\n}\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuanuo%2Fdictionary-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuanuo%2Fdictionary-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuanuo%2Fdictionary-api/lists"}