wikontic 0.0.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. wikontic/__init__.py +16 -0
  2. wikontic/create_ontological_triplets_db.py +193 -0
  3. wikontic/create_triplets_db.py +259 -0
  4. wikontic/create_wikidata_ontology_db.py +555 -0
  5. wikontic/utils/__init__.py +7 -0
  6. wikontic/utils/base_inference_with_db.py +329 -0
  7. wikontic/utils/dynamic_aligner.py +281 -0
  8. wikontic/utils/inference_with_db.py +224 -0
  9. wikontic/utils/ontology_mappings/entity_hierarchy.json +1 -0
  10. wikontic/utils/ontology_mappings/entity_names.json +1 -0
  11. wikontic/utils/ontology_mappings/entity_type2aliases.json +1 -0
  12. wikontic/utils/ontology_mappings/entity_type2hierarchy.json +1 -0
  13. wikontic/utils/ontology_mappings/entity_type2label.json +1 -0
  14. wikontic/utils/ontology_mappings/enum_entity_ids.json +1 -0
  15. wikontic/utils/ontology_mappings/enum_prop_ids.json +1 -0
  16. wikontic/utils/ontology_mappings/label2entity.json +1 -0
  17. wikontic/utils/ontology_mappings/obj_constraint2prop.json +1 -0
  18. wikontic/utils/ontology_mappings/prop2aliases.json +1 -0
  19. wikontic/utils/ontology_mappings/prop2constraints.json +1 -0
  20. wikontic/utils/ontology_mappings/prop2data_type.json +1 -0
  21. wikontic/utils/ontology_mappings/prop2label.json +1 -0
  22. wikontic/utils/ontology_mappings/propid2enum.json +1 -0
  23. wikontic/utils/ontology_mappings/subj_constraint2prop.json +1 -0
  24. wikontic/utils/ontology_mappings/subject_object_constraints.json +1 -0
  25. wikontic/utils/openai_utils.py +517 -0
  26. wikontic/utils/prompts/name_refinement/prompt_choose_relation_wo_entity_types.txt +17 -0
  27. wikontic/utils/prompts/name_refinement/prompt_choose_relation_wo_entity_types_dialog_bench.txt +18 -0
  28. wikontic/utils/prompts/name_refinement/rank_object_names.txt +17 -0
  29. wikontic/utils/prompts/name_refinement/rank_object_names_dialog_bench.txt +18 -0
  30. wikontic/utils/prompts/name_refinement/rank_object_qualifiers.txt +20 -0
  31. wikontic/utils/prompts/name_refinement/rank_subject_names.txt +18 -0
  32. wikontic/utils/prompts/name_refinement/rank_subject_names_dialog_bench.txt +20 -0
  33. wikontic/utils/prompts/ontology_refinement/prompt_choose_entity_types.txt +26 -0
  34. wikontic/utils/prompts/ontology_refinement/prompt_choose_relation.txt +24 -0
  35. wikontic/utils/prompts/ontology_refinement/prompt_choose_relation_and_types.txt +28 -0
  36. wikontic/utils/prompts/qa/prompt_choose_relevant_entities_for_question.txt +17 -0
  37. wikontic/utils/prompts/qa/prompt_choose_relevant_entities_for_question_wo_types.txt +16 -0
  38. wikontic/utils/prompts/qa/prompt_entity_extraction_from_question.txt +3 -0
  39. wikontic/utils/prompts/qa/prompt_is_answered.txt +43 -0
  40. wikontic/utils/prompts/qa/qa_collapsing_prompt.txt +22 -0
  41. wikontic/utils/prompts/qa/qa_prompt.txt +5 -0
  42. wikontic/utils/prompts/qa/qa_prompt_hotpot.txt +6 -0
  43. wikontic/utils/prompts/qa/question_decomposition_1.txt +7 -0
  44. wikontic/utils/prompts/triplet_extraction/prompt_1_types_qualifiers_dialog_bench.txt +75 -0
  45. wikontic/utils/prompts/triplet_extraction/prompt_1_types_qualifiers_dialog_bench_in_russian.txt +78 -0
  46. wikontic/utils/prompts/triplet_extraction/propmt_1_types_qualifiers.txt +91 -0
  47. wikontic/utils/structured_aligner.py +606 -0
  48. wikontic/utils/structured_inference_with_db.py +561 -0
  49. wikontic-0.0.3.dist-info/METADATA +111 -0
  50. wikontic-0.0.3.dist-info/RECORD +53 -0
  51. wikontic-0.0.3.dist-info/WHEEL +5 -0
  52. wikontic-0.0.3.dist-info/licenses/LICENSE +19 -0
  53. wikontic-0.0.3.dist-info/top_level.txt +1 -0
@@ -0,0 +1,53 @@
1
+ wikontic/__init__.py,sha256=9zw-dHDIyJ49TJ0PI3vHuW4wucW7_EhSyX98XE3_rys,483
2
+ wikontic/create_ontological_triplets_db.py,sha256=yz2Nc1kxbtAagZuovKpxc2P3OH4qBalQNd7m7s9kpWo,6764
3
+ wikontic/create_triplets_db.py,sha256=MsrNQmzkk6wxwy8gMV19FdRFCMiFmF13Z3bn2P9ZAQQ,8845
4
+ wikontic/create_wikidata_ontology_db.py,sha256=O_dDMtqTlVGhaLCDy9yIbFUhQXCdg5pGohR6MmONkAI,18071
5
+ wikontic/utils/__init__.py,sha256=U41kQFNPpfYV6KJpMnkqgqLkozqXiG4tgV6rj8IW1BU,7
6
+ wikontic/utils/base_inference_with_db.py,sha256=Jv8HxHwg2mBtqDHZTCzQdYY3Jjv8jDMr8nMR9FI6rWc,12965
7
+ wikontic/utils/dynamic_aligner.py,sha256=xKw0spAHn6lxNRX_9xuLY5FtWEHAoIfwB2HYaAEgKJY,9616
8
+ wikontic/utils/inference_with_db.py,sha256=iuvF08DQ16SThovSGLCLyApme-AidLLWO9DPP0ozM3c,8824
9
+ wikontic/utils/openai_utils.py,sha256=93f9w7V-zAVub4b79_zFvRWnyPyjqR4qBYRPUv6fVE8,20462
10
+ wikontic/utils/structured_aligner.py,sha256=WzX_J0MaAUip1w3nXGXF8AZJ2n6UZraKBVgLa69Br9A,22093
11
+ wikontic/utils/structured_inference_with_db.py,sha256=kbDC1q87cdqqtWEnJmopJCvG9Da75R_Xj2EOt0USAtA,22916
12
+ wikontic/utils/ontology_mappings/entity_hierarchy.json,sha256=QG-uGxDlgw_wHI40Y57wTUUbd5fPeKYtDsYGzdwP448,951258
13
+ wikontic/utils/ontology_mappings/entity_names.json,sha256=if_hnOL4RGgZyYgDmgKL41GL6zq0rG6WZ6EKIf6UXr0,144317
14
+ wikontic/utils/ontology_mappings/entity_type2aliases.json,sha256=r0QVK70KXAWVfDJ5ii0oKfyK59oy5YNzCu5LPiM8jZI,219271
15
+ wikontic/utils/ontology_mappings/entity_type2hierarchy.json,sha256=QG-uGxDlgw_wHI40Y57wTUUbd5fPeKYtDsYGzdwP448,951258
16
+ wikontic/utils/ontology_mappings/entity_type2label.json,sha256=AmfMETuUEBANDCiPmACUIKt2hEq-vfderxgH6kWR_D4,115312
17
+ wikontic/utils/ontology_mappings/enum_entity_ids.json,sha256=if_hnOL4RGgZyYgDmgKL41GL6zq0rG6WZ6EKIf6UXr0,144317
18
+ wikontic/utils/ontology_mappings/enum_prop_ids.json,sha256=M089PA6_wQsJJenpZj1zd0vmBHmfu3Z3kV1yW7m4suY,95610
19
+ wikontic/utils/ontology_mappings/label2entity.json,sha256=tzZ-qgfVZ1seqf7PEIVJtzHs4QgKYgDGH3tf2Ky5dzo,115056
20
+ wikontic/utils/ontology_mappings/obj_constraint2prop.json,sha256=0aIj6b4WAxRWZj92dev3rnG1MMKAAIeoi3kcgwrTNgM,78355
21
+ wikontic/utils/ontology_mappings/prop2aliases.json,sha256=XliXTdbfB02D_--FZBYr73KUxuffUHMNofUTFrtlPSo,189752
22
+ wikontic/utils/ontology_mappings/prop2constraints.json,sha256=T0pYIhhs4GTYQv6sagKx-WpezPw2TBmbDE_xph7Vs8E,305511
23
+ wikontic/utils/ontology_mappings/prop2data_type.json,sha256=R3H8ODUB9Tsk-jGI-7NBD3GnkdofXZP4lrclW3BZCGI,44721
24
+ wikontic/utils/ontology_mappings/prop2label.json,sha256=jPO4c_GzSXP1__7-94XzJ6Xo79eNoBUNpnu47lZZA74,74426
25
+ wikontic/utils/ontology_mappings/propid2enum.json,sha256=GbnnhPQRE3dgM8tT_lsEEXta2eXjBBLl6w1CtRkbhu4,91544
26
+ wikontic/utils/ontology_mappings/subj_constraint2prop.json,sha256=lk2yqj0FjuJIvUOLfsTWyhi6b6v8xwMaSTiYmiRDujc,96668
27
+ wikontic/utils/ontology_mappings/subject_object_constraints.json,sha256=YbFNWE5fefZRwIHum7aht4yMIyhMMlvd36smbxuAbZo,205918
28
+ wikontic/utils/prompts/name_refinement/prompt_choose_relation_wo_entity_types.txt,sha256=vVv7mUrTaSkWacC7EimlnjyZcFRqema7gJ4-ecxMPm4,1294
29
+ wikontic/utils/prompts/name_refinement/prompt_choose_relation_wo_entity_types_dialog_bench.txt,sha256=HDE1ysDUbFCN3A51YnvzRTmw7_7gbQXJcnbdG4M3q7A,1438
30
+ wikontic/utils/prompts/name_refinement/rank_object_names.txt,sha256=Gfbb0rfNDIBRkZYitf-Z38S0petd7SbEtiFlAgePH9o,1220
31
+ wikontic/utils/prompts/name_refinement/rank_object_names_dialog_bench.txt,sha256=j2ovw_e1hOcUPFs3lQW6iCG4BOZXw_WPkZzOLYFY_mI,1362
32
+ wikontic/utils/prompts/name_refinement/rank_object_qualifiers.txt,sha256=PlL3UMG-Mo7RhnE-M_0p-16Ct65igaC5Prtf7SuD3Fg,1636
33
+ wikontic/utils/prompts/name_refinement/rank_subject_names.txt,sha256=e33VmqE1CHl9HG-VY12gW1ePc9MPCTUg7KqJNy5yp9Y,1202
34
+ wikontic/utils/prompts/name_refinement/rank_subject_names_dialog_bench.txt,sha256=dKPpmmJj-3AFHx7Nb3XCjCa24sDgRnVolKpn9BnbMsM,1346
35
+ wikontic/utils/prompts/ontology_refinement/prompt_choose_entity_types.txt,sha256=GJ7ywP-w0f5BDE20DZ8SPhRi4Jjz4x-noyGoVM3-z0w,1553
36
+ wikontic/utils/prompts/ontology_refinement/prompt_choose_relation.txt,sha256=c3zAWw5Ol_t8xpWMGBOKSMDTcrMMN6ongo04jc--t-w,1418
37
+ wikontic/utils/prompts/ontology_refinement/prompt_choose_relation_and_types.txt,sha256=jIG25X15KQxzIaBYs5-_0REbKTSkUuciAhGsSuQuyqI,2203
38
+ wikontic/utils/prompts/qa/prompt_choose_relevant_entities_for_question.txt,sha256=PuiMZlECAqzEWd4YpDX1DIydyTl7-_S0gx3NO7YeUM0,1037
39
+ wikontic/utils/prompts/qa/prompt_choose_relevant_entities_for_question_wo_types.txt,sha256=XSpacCdLCR4P-fE-XPvvX12cnrjYUsnlT_Co1jcAD-E,977
40
+ wikontic/utils/prompts/qa/prompt_entity_extraction_from_question.txt,sha256=X_5v1s8LCsJTPil7BO1fT8FPAnJsh6diNAKcVL3-W1g,368
41
+ wikontic/utils/prompts/qa/prompt_is_answered.txt,sha256=pNsTHztVqHGj-Yzk_mLQfmSLOp54ABIHeGMOzdhmJaQ,1442
42
+ wikontic/utils/prompts/qa/qa_collapsing_prompt.txt,sha256=yyRQEzmMOjp8tEwcBmZG3tQu0NGE1Q3dGcDcMR10xjA,847
43
+ wikontic/utils/prompts/qa/qa_prompt.txt,sha256=hRG7QyzAIRRposHoHhb-aBudPDYy08Oj6FVPLl-KmoU,427
44
+ wikontic/utils/prompts/qa/qa_prompt_hotpot.txt,sha256=8vqAwF--j__szgTOrDJpAB8FeGI3xJT19b_CV3HVIcA,575
45
+ wikontic/utils/prompts/qa/question_decomposition_1.txt,sha256=lDhkPRugox4zlqJxjr4bcPQY2LQz2P-HW6YhbeymzxQ,335
46
+ wikontic/utils/prompts/triplet_extraction/prompt_1_types_qualifiers_dialog_bench.txt,sha256=1cnJxjTXvOMKIplJKaUgx-tLxe1hpZJtwNbcNxX8fuw,3885
47
+ wikontic/utils/prompts/triplet_extraction/prompt_1_types_qualifiers_dialog_bench_in_russian.txt,sha256=CqoM-9iMcbihwqkh38lVdZF3We1GYpju6u2cyKsb_AU,5425
48
+ wikontic/utils/prompts/triplet_extraction/propmt_1_types_qualifiers.txt,sha256=Nq940rMcrNZmVTOxMKL3xYB0bDhxINVWi2ShJkJ2xRo,4034
49
+ wikontic-0.0.3.dist-info/licenses/LICENSE,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
50
+ wikontic-0.0.3.dist-info/METADATA,sha256=DEQ-rt1sOOLzqOAvvmBFsufOOcnDzzDWO893P9KIApo,3312
51
+ wikontic-0.0.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
52
+ wikontic-0.0.3.dist-info/top_level.txt,sha256=VkTVWaTtu5zD7QL2iF2cS4LOQAiPp_P0pssCxETRB_o,9
53
+ wikontic-0.0.3.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2018 The Python Packaging Authority
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ wikontic