llm-ie 0.1.3__tar.gz → 0.1.4__tar.gz
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.
- {llm_ie-0.1.3 → llm_ie-0.1.4}/PKG-INFO +1 -1
- {llm_ie-0.1.3 → llm_ie-0.1.4}/pyproject.toml +1 -1
- {llm_ie-0.1.3 → llm_ie-0.1.4}/src/llm_ie/extractors.py +5 -5
- {llm_ie-0.1.3 → llm_ie-0.1.4}/README.md +0 -0
- {llm_ie-0.1.3 → llm_ie-0.1.4}/src/llm_ie/__init__.py +0 -0
- {llm_ie-0.1.3 → llm_ie-0.1.4}/src/llm_ie/asset/PromptEditor_prompts/comment.txt +0 -0
- {llm_ie-0.1.3 → llm_ie-0.1.4}/src/llm_ie/asset/PromptEditor_prompts/rewrite.txt +0 -0
- {llm_ie-0.1.3 → llm_ie-0.1.4}/src/llm_ie/asset/prompt_guide/BasicFrameExtractor_prompt_guide.txt +0 -0
- {llm_ie-0.1.3 → llm_ie-0.1.4}/src/llm_ie/asset/prompt_guide/ReviewFrameExtractor_prompt_guide.txt +0 -0
- {llm_ie-0.1.3 → llm_ie-0.1.4}/src/llm_ie/asset/prompt_guide/SentenceFrameExtractor_prompt_guide.txt +0 -0
- {llm_ie-0.1.3 → llm_ie-0.1.4}/src/llm_ie/data_types.py +0 -0
- {llm_ie-0.1.3 → llm_ie-0.1.4}/src/llm_ie/engines.py +0 -0
- {llm_ie-0.1.3 → llm_ie-0.1.4}/src/llm_ie/prompt_editor.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import os
|
|
2
1
|
import abc
|
|
3
2
|
import re
|
|
3
|
+
import json
|
|
4
4
|
import importlib.resources
|
|
5
5
|
from typing import List, Dict, Tuple, Union
|
|
6
6
|
from llm_ie.data_types import LLMInformationExtractionFrame
|
|
@@ -70,12 +70,12 @@ class FrameExtractor:
|
|
|
70
70
|
"""
|
|
71
71
|
pattern = r'\{.*?\}'
|
|
72
72
|
out = []
|
|
73
|
-
for
|
|
73
|
+
for match in re.findall(pattern, gen_text, re.DOTALL):
|
|
74
74
|
try:
|
|
75
|
-
tup_dict =
|
|
75
|
+
tup_dict = json.loads(match)
|
|
76
76
|
out.append(tup_dict)
|
|
77
|
-
except:
|
|
78
|
-
print(f'Post-processing failed at:\n{
|
|
77
|
+
except json.JSONDecodeError:
|
|
78
|
+
print(f'Post-processing failed at:\n{match}')
|
|
79
79
|
return out
|
|
80
80
|
|
|
81
81
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{llm_ie-0.1.3 → llm_ie-0.1.4}/src/llm_ie/asset/prompt_guide/BasicFrameExtractor_prompt_guide.txt
RENAMED
|
File without changes
|
{llm_ie-0.1.3 → llm_ie-0.1.4}/src/llm_ie/asset/prompt_guide/ReviewFrameExtractor_prompt_guide.txt
RENAMED
|
File without changes
|
{llm_ie-0.1.3 → llm_ie-0.1.4}/src/llm_ie/asset/prompt_guide/SentenceFrameExtractor_prompt_guide.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|