Ki-Seki commited on
Commit
0b48c77
1 Parent(s): b781aec

!refactor: modularization

Browse files
README.md CHANGED
@@ -2,41 +2,21 @@
2
 
3
  ## Introduction
4
 
5
- Welcome to Auto Tabular Completion, a Python script designed to automatically fill in missing values in tabular data using advanced in-context learning techniques. This tool leverages the capabilities of LLMs to predict output values based on given input data.
6
 
7
- ![Demo](./assets/demo.png)
8
 
9
  ## Quick Start
10
 
11
- 1. Clone the repository:
12
- ```bash
13
- git clone https://github.com/Ki-Seki/autotab.git
14
- cd autotab
15
- ```
16
- 2. Install the required dependencies:
17
- ```bash
18
- pip install -r requirements.txt
19
- ```
20
- 3. Running the Script
21
- ```bash
22
- python main.py \
23
- --file <path_to_your_file>.xlsx \
24
- --api_key <YOUR_OPENAI_API_KEY> \
25
- [--base_url <BASE_URL>] \
26
- [--model <MODEL_NAME>]
27
- ```
28
 
29
- ## More
 
30
 
31
- ### Optional Arguments
32
 
33
- - `--base_url`: Specify the base URL for the OpenAI API. This is useful if you're using a different API endpoint, such as one provided by [Silicon Flow](https://cloud.siliconflow.cn/). Default is the official OpenAI API endpoint.
34
- - `--model`: Choose the model to use for predictions. By default, the script uses `Qwen/Qwen2-7B-Instruct`.
35
 
36
- ### Input Data Format
37
 
38
- Your Excel file should contain columns prefixed with `[Input]` for input variables and `[Output]` for known or expected output values. Any columns not following this naming convention will be ignored during the prediction process.
39
-
40
- ### Output
41
-
42
- After running the script, a new Excel file will be generated in the same directory as the input file, named `file_output.xlsx`, with all missing output values filled in based on the predictions made by the model.
 
2
 
3
  ## Introduction
4
 
5
+ Welcome to Auto Tabular Completion. It automatically fill in missing values in tabular data using in-context learning techniques. This tool leverages the capabilities of LLMs to predict output values based on given input data.
6
 
7
+ ![Demo1](./assets/demo1.png)
8
 
9
  ## Quick Start
10
 
11
+ Check [demo1.ipynb](demo1.ipynb) and [demo2.ipynb](demo2.ipynb) for usage.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
+ > [!Note]
14
+ > Give it a try with my personal key in the two demo notebooks (valid until 2024-11-01).
15
 
16
+ ## API
17
 
18
+ [Silicon Flow](https://cloud.siliconflow.cn/) provides free API.
 
19
 
20
+ ## Input Format
21
 
22
+ Your Excel file should contain columns prefixed with `[Input] ` for input variables and `[Output] ` for known or expected output values. Any columns not following this naming convention will be ignored during the prediction process.
 
 
 
 
assets/demo.png DELETED
Binary file (123 kB)
 
assets/demo1.png ADDED
autotab.py CHANGED
@@ -1,126 +1,118 @@
1
- import argparse
2
- import concurrent.futures
3
- import os
4
  import re
5
 
6
  import openai
7
  import pandas as pd
8
-
9
-
10
- def load_excel(file_path):
11
- """Load the Excel file and identify input and output columns."""
12
- df = pd.read_excel(file_path)
13
- input_columns = [col for col in df.columns if col.startswith("[Input]")]
14
- output_columns = [col for col in df.columns if col.startswith("[Output]")]
15
- return df, input_columns, output_columns
16
-
17
-
18
- def derive_in_context(data, input_columns, output_columns):
19
- """Derive in-context learning data from the given DataFrame."""
20
- n = len(data.dropna(subset=output_columns))
21
- in_context = ""
22
- for i in range(n):
23
- in_context += "".join(
24
- f"<{col.replace('[Input] ', '')}>{data[col].iloc[i]}</{col.replace('[Input] ', '')}>\n"
25
- for col in input_columns
26
- ) + "".join(
27
- f"<{col.replace('[Output] ', '')}>{data[col].iloc[i]}</{col.replace('[Output] ', '')}>\n"
28
- for col in output_columns
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  )
30
- return in_context, n
31
-
32
-
33
- def predict_output(in_context, input_data, input_columns, api_key, model, base_url):
34
- """Predict the output values for the given input data using the OpenAI API."""
35
- client = openai.OpenAI(api_key=api_key, base_url=base_url)
36
- query = in_context + "".join(
37
- f"<{col.replace('[Input] ', '')}>{input_data[col]}</{col.replace('[Input] ', '')}>\n"
38
- for col in input_columns
39
- )
40
- response = client.chat.completions.create(
41
- model=model, messages=[{"role": "user", "content": query}], max_tokens=64, n=1
42
- )
43
- predictions = response.choices[0].message.content.strip()
44
- return predictions
45
-
46
-
47
- def extract_fields(prediction, output_columns):
48
- """Extract fields from the prediction text based on output columns."""
49
- extracted = {}
50
- for col in output_columns:
51
- tag = col.replace("[Output] ", "")
52
- match = re.search(f"<{tag}>(.*?)</{tag}>", prediction)
53
- extracted[tag] = match.group(1) if match else ""
54
- return extracted
55
-
56
-
57
- def process_file(file_path, api_key, model, base_url):
58
- """Process the entire Excel file and predict output values for missing entries."""
59
- df, input_columns, output_columns = load_excel(file_path)
60
- in_context, n = derive_in_context(df, input_columns, output_columns)
61
-
62
- results = [None] * (len(df) - n) # Pre-allocate a list for results
63
- with concurrent.futures.ThreadPoolExecutor() as executor:
64
- futures = {
65
- executor.submit(
66
- predict_output,
67
- in_context,
68
- df.iloc[i],
69
- input_columns,
70
- api_key,
71
- model,
72
- base_url,
73
- ): i
74
- - n
75
- for i in range(n, len(df))
76
- }
77
- for future in concurrent.futures.as_completed(futures):
78
- idx = futures[future]
79
- try:
80
- prediction = future.result()
81
- extracted_fields = extract_fields(prediction, output_columns)
82
- results[idx] = extracted_fields
83
- except Exception as e:
84
- results[idx] = {
85
- col.replace("[Output] ", ""): f"Error: {e}"
86
- for col in output_columns
87
- }
88
-
89
- # Assign results to the DataFrame
90
- for i, extracted_fields in enumerate(results, start=n):
91
  for col in output_columns:
92
- tag = col.replace("[Output] ", "")
93
- df.at[i, col] = extracted_fields.get(tag, "")
94
-
95
- # Save the updated DataFrame to a new Excel file
96
- output_file_path = os.path.splitext(file_path)[0] + "_output.xlsx"
97
- df.to_excel(output_file_path, index=False)
98
- print(f"Results saved to {output_file_path}")
99
-
100
-
101
- def main():
102
- """Main function to parse arguments and execute the processing."""
103
- parser = argparse.ArgumentParser(
104
- description="Auto Tabular Completion with In-Context Learning"
105
- )
106
- parser.add_argument("--file", required=True, help="Path to the Excel file")
107
- parser.add_argument("--api_key", required=True, help="OpenAI API key")
108
- parser.add_argument(
109
- "--base_url", required=False, help="OpenAI API base URL", default=None
110
- )
111
- parser.add_argument(
112
- "--model",
113
- required=False,
114
- help="OpenAI model to use",
115
- default="Qwen/Qwen2-7B-Instruct",
116
- )
117
-
118
- args = parser.parse_args(
119
- "--file data/sample_nlp.xlsx --api_key sk-exhahhjfqyanmwewndukcqtrpegfdbwszkjucvcpajdufiah --base_url https://api.siliconflow.cn/v1".split()
120
- )
121
-
122
- process_file(args.file, args.api_key, args.model, args.base_url)
123
-
124
-
125
- if __name__ == "__main__":
126
- main()
 
 
 
 
1
  import re
2
 
3
  import openai
4
  import pandas as pd
5
+ from tqdm import tqdm
6
+
7
+
8
+ class AutoTab:
9
+ def __init__(
10
+ self,
11
+ in_file_path: str,
12
+ out_file_path: str,
13
+ max_examples: int,
14
+ model_name: str,
15
+ api_key: str,
16
+ base_url: str,
17
+ generation_config: dict,
18
+ save_every: int,
19
+ instruction: str,
20
+ ):
21
+ self.in_file_path = in_file_path
22
+ self.out_file_path = out_file_path
23
+ self.max_examples = max_examples
24
+ self.model_name = model_name
25
+ self.api_key = api_key
26
+ self.base_url = base_url
27
+ self.generation_config = generation_config
28
+ self.save_every = save_every
29
+ self.instruction = instruction
30
+
31
+ # ─── IO ───────────────────────────────────────────────────────────────
32
+
33
+ def load_excel(self) -> tuple[pd.DataFrame, list, list]:
34
+ """Load the Excel file and identify input and output fields."""
35
+ df = pd.read_excel(self.in_file_path)
36
+ input_fields = [col for col in df.columns if col.startswith("[Input] ")]
37
+ output_fields = [col for col in df.columns if col.startswith("[Output] ")]
38
+ return df, input_fields, output_fields
39
+
40
+ # ─── LLM ──────────────────────────────────────────────────────────────
41
+
42
+ def openai_request(self, query: str) -> str:
43
+ """Make a request to an OpenAI-format API."""
44
+ client = openai.OpenAI(api_key=self.api_key, base_url=self.base_url)
45
+ response = client.chat.completions.create(
46
+ model=self.model_name,
47
+ messages=[{"role": "user", "content": query}],
48
+ **self.generation_config,
49
  )
50
+ str_response = response.choices[0].message.content.strip()
51
+ return str_response
52
+
53
+ # ─── In-Context Learning ──────────────────────────────────────────────
54
+
55
+ def derive_incontext(
56
+ self, data: pd.DataFrame, input_columns: list[str], output_columns: list[str]
57
+ ) -> str:
58
+ """Derive the in-context prompt with angle brackets."""
59
+ n = min(self.max_examples, len(data.dropna(subset=output_columns)))
60
+ in_context = ""
61
+ for i in range(n):
62
+ in_context += "".join(
63
+ f"<{col.replace('[Input] ', '')}>{data[col].iloc[i]}</{col.replace('[Input] ', '')}>\n"
64
+ for col in input_columns
65
+ )
66
+ in_context += "".join(
67
+ f"<{col.replace('[Output] ', '')}>{data[col].iloc[i]}</{col.replace('[Output] ', '')}>\n"
68
+ for col in output_columns
69
+ )
70
+ in_context += "\n"
71
+ self.in_context = in_context
72
+ return in_context
73
+
74
+ def predict_output(
75
+ self, in_context: str, input_data: pd.DataFrame, input_fields: str
76
+ ):
77
+ """Predict the output values for the given input data using the API."""
78
+ query = (
79
+ self.instruction
80
+ + "\n\n"
81
+ + in_context
82
+ + "".join(
83
+ f"<{col.replace('[Input] ', '')}>{input_data[col]}</{col.replace('[Input] ', '')}>\n"
84
+ for col in input_fields
85
+ )
86
+ )
87
+ self.query_example = query
88
+ output = self.openai_request(query)
89
+ return output
90
+
91
+ def extract_fields(
92
+ self, response: str, output_columns: list[str]
93
+ ) -> dict[str, str]:
94
+ """Extract fields from the response text based on output columns."""
95
+ extracted = {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  for col in output_columns:
97
+ field = col.replace("[Output] ", "")
98
+ match = re.search(f"<{field}>(.*?)</{field}>", response)
99
+ extracted[col] = match.group(1) if match else ""
100
+ return extracted
101
+
102
+ # ─── Engine ───────────────────────────────────────────────────────────
103
+
104
+ def run(self):
105
+ data, input_fields, output_fields = self.load_excel()
106
+ in_context = self.derive_incontext(data, input_fields, output_fields)
107
+
108
+ num_existed_examples = len(data.dropna(subset=output_fields))
109
+
110
+ for i in tqdm(range(num_existed_examples, len(data))):
111
+ prediction = self.predict_output(in_context, data.iloc[i], input_fields)
112
+ extracted_fields = self.extract_fields(prediction, output_fields)
113
+ for field_name in output_fields:
114
+ data.at[i, field_name] = extracted_fields.get(field_name, "")
115
+ if i % self.save_every == 0:
116
+ data.to_excel(self.out_file_path, index=False)
117
+ data.to_excel(self.out_file_path, index=False)
118
+ print(f"Results saved to {self.out_file_path}")
 
 
 
 
 
 
 
 
 
 
 
 
 
data/ch_patent_input.xlsx ADDED
Binary file (33 kB). View file
 
data/ch_patent_output.xlsx ADDED
Binary file (41.5 kB). View file
 
data/{sample_nlp.xlsx → en_qa_input.xlsx} RENAMED
Binary files a/data/sample_nlp.xlsx and b/data/en_qa_input.xlsx differ
 
data/{sample_nlp_output.xlsx → en_qa_output.xlsx} RENAMED
Binary files a/data/sample_nlp_output.xlsx and b/data/en_qa_output.xlsx differ
 
demo1.ipynb ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "metadata": {},
7
+ "outputs": [
8
+ {
9
+ "name": "stderr",
10
+ "output_type": "stream",
11
+ "text": [
12
+ "100%|██████████| 3/3 [00:01<00:00, 2.60it/s]"
13
+ ]
14
+ },
15
+ {
16
+ "name": "stdout",
17
+ "output_type": "stream",
18
+ "text": [
19
+ "Results saved to data/en_qa_output.xlsx\n"
20
+ ]
21
+ },
22
+ {
23
+ "name": "stderr",
24
+ "output_type": "stream",
25
+ "text": [
26
+ "\n"
27
+ ]
28
+ }
29
+ ],
30
+ "source": [
31
+ "from autotab import AutoTab\n",
32
+ "\n",
33
+ "\n",
34
+ "autotab = AutoTab(\n",
35
+ " in_file_path=\"data/en_qa_input.xlsx\",\n",
36
+ " out_file_path=\"data/en_qa_output.xlsx\",\n",
37
+ " max_examples=5,\n",
38
+ " model_name=\"Qwen/Qwen2-7B-Instruct\",\n",
39
+ " api_key=\"sk-exhahhjfqyanmwewndukcqtrpegfdbwszkjucvcpajdufiah\",\n",
40
+ " base_url=\"https://public-beta-api.siliconflow.cn/v1\",\n",
41
+ " generation_config={\"temperature\": 0, \"max_tokens\": 128},\n",
42
+ " save_every=10,\n",
43
+ " instruction='You should help me classify the questions and answer them.',\n",
44
+ ")\n",
45
+ "autotab.run()\n"
46
+ ]
47
+ },
48
+ {
49
+ "cell_type": "code",
50
+ "execution_count": 2,
51
+ "metadata": {},
52
+ "outputs": [
53
+ {
54
+ "name": "stdout",
55
+ "output_type": "stream",
56
+ "text": [
57
+ "You should help me classify the questions and answer them.\n",
58
+ "\n",
59
+ "<Question>What is the capital of France?</Question>\n",
60
+ "<Category>Geography</Category>\n",
61
+ "<Answer>Paris</Answer>\n",
62
+ "\n",
63
+ "<Question>Who wrote '1984'?</Question>\n",
64
+ "<Category>Literature</Category>\n",
65
+ "<Answer>George Orwell</Answer>\n",
66
+ "\n",
67
+ "<Question>What is the largest planet in the solar system?</Question>\n",
68
+ "<Category>Astronomy</Category>\n",
69
+ "<Answer>Jupiter</Answer>\n",
70
+ "\n",
71
+ "<Question>Who painted the Mona Lisa?</Question>\n",
72
+ "<Category>Art</Category>\n",
73
+ "<Answer>Leonardo da Vinci</Answer>\n",
74
+ "\n",
75
+ "<Question>What is the currency of Japan?</Question>\n",
76
+ "<Category>Economics</Category>\n",
77
+ "<Answer>Yen</Answer>\n",
78
+ "\n",
79
+ "<Question>Who is the first president of the United States?</Question>\n",
80
+ "\n"
81
+ ]
82
+ }
83
+ ],
84
+ "source": [
85
+ "print(autotab.query_example)"
86
+ ]
87
+ }
88
+ ],
89
+ "metadata": {
90
+ "kernelspec": {
91
+ "display_name": "common",
92
+ "language": "python",
93
+ "name": "python3"
94
+ },
95
+ "language_info": {
96
+ "codemirror_mode": {
97
+ "name": "ipython",
98
+ "version": 3
99
+ },
100
+ "file_extension": ".py",
101
+ "mimetype": "text/x-python",
102
+ "name": "python",
103
+ "nbconvert_exporter": "python",
104
+ "pygments_lexer": "ipython3",
105
+ "version": "3.11.5"
106
+ }
107
+ },
108
+ "nbformat": 4,
109
+ "nbformat_minor": 2
110
+ }
demo2.ipynb ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "metadata": {},
7
+ "outputs": [
8
+ {
9
+ "name": "stderr",
10
+ "output_type": "stream",
11
+ "text": [
12
+ "100%|██████████| 83/83 [01:19<00:00, 1.05it/s]"
13
+ ]
14
+ },
15
+ {
16
+ "name": "stdout",
17
+ "output_type": "stream",
18
+ "text": [
19
+ "Results saved to data/ch_patent_output.xlsx\n"
20
+ ]
21
+ },
22
+ {
23
+ "name": "stderr",
24
+ "output_type": "stream",
25
+ "text": [
26
+ "\n"
27
+ ]
28
+ }
29
+ ],
30
+ "source": [
31
+ "from autotab import AutoTab\n",
32
+ "\n",
33
+ "\n",
34
+ "instruction = \"\"\"你是一位专利分类专家,擅长判断专利是否属于智能化专利。请根据我提供的“智能化专利”定义、示例以及某专利的摘要,判断该专利是否属于智能化专利。\n",
35
+ "\n",
36
+ "## 智能化专利定义\n",
37
+ "\n",
38
+ "智能化专利是指通过利用先进智能技术(包括但不限于人工智能、高端芯片、量子信息、物联网、区块链、工业互联网和元宇宙)来提升系统、设备或流程的自主决策能力、自动化程度和优化效果的专利。这些专利旨在显著提高效率、减少错误、提升生产力,甚至实现新的功能和应用场景。例如,专利摘要中如果明确提到“使用人工智能技术”或“利用物联网技术”等词句的描述,则可以归为智能化专利。又例如,即使专利摘要中未出现这些明显词句,但如果描述了一种智能系统或设备,通过其自主运行或优化功能,能够在实际应用中减少人力操作,这类专利也可归为智能化专利。\n",
39
+ "\n",
40
+ "## 注意事项\n",
41
+ "\n",
42
+ "* 判断依据需要精简,一两句话即可。\n",
43
+ "* 请只回答判断依据和判断,不要包括任何多余内容。\n",
44
+ "\n",
45
+ "## 示例\"\"\"\n",
46
+ "\n",
47
+ "autotab = AutoTab(\n",
48
+ " in_file_path=\"data/ch_patent_input.xlsx\",\n",
49
+ " out_file_path=\"data/ch_patent_output.xlsx\",\n",
50
+ " max_examples=4,\n",
51
+ " model_name=\"Qwen/Qwen2-7B-Instruct\",\n",
52
+ " api_key=\"sk-exhahhjfqyanmwewndukcqtrpegfdbwszkjucvcpajdufiah\",\n",
53
+ " base_url=\"https://public-beta-api.siliconflow.cn/v1\",\n",
54
+ " generation_config={\"temperature\": 0, \"max_tokens\": 512},\n",
55
+ " save_every=10,\n",
56
+ " instruction=instruction,\n",
57
+ ")\n",
58
+ "autotab.run()\n"
59
+ ]
60
+ },
61
+ {
62
+ "cell_type": "code",
63
+ "execution_count": 2,
64
+ "metadata": {},
65
+ "outputs": [
66
+ {
67
+ "name": "stdout",
68
+ "output_type": "stream",
69
+ "text": [
70
+ "你是一位专利分类专家,擅长判断专利是否属于智能化专利。请根据我提供的“智能化专利”定义、示例以及某专利的摘要,判断该专利是否属于智能化专利。\n",
71
+ "\n",
72
+ "## 智能化专利定义\n",
73
+ "\n",
74
+ "智能化专利是指通过利用先进智能技术(包括但不限于人工智能、高端芯片、量子信息、物联网、区块链、工业互联网和元宇宙)来提升系统、设备或流程的自主决策能力、自动化程度和优化效果的专利。这些专利旨在显著提高效率、减少错误、提升生产力,甚至实现新的功能和应用场景。例如,专利摘要中如果明确提到“使用人工智能技术”或“利用物联网技术”等词句的描述,则可以归为智能化专利。又例如,即使专利摘要中未出现这些明显词句,但如果描述了一种智能系统或设备,通过其自主运行或优化功能,能够在实际应用中减少人力操作,这类专利也可归为智能化专利。\n",
75
+ "\n",
76
+ "## 注意事项\n",
77
+ "\n",
78
+ "* 判断依据需要精简,一两句话即可。\n",
79
+ "* 请只回答判断依据和判断,不要包括任何多余内容。\n",
80
+ "\n",
81
+ "## 示例\n",
82
+ "\n",
83
+ "<摘要>本发明公开了一种电动汽车智能节能充电桩系统及充电优化方法,属于汽车充电桩技术领域,包括车辆识别模块、充电预约模块、充电模块和服务器;所述充电预约模块用于电动汽车用户预约充电桩,建立预约通道,用户进行身份注册,将用户的注册信息进行储存,并生成识别标志;用户通过预约通道预约充电桩,设置充电预约时间YT、等待计费价格JG和等待时长DT,并将预约信息发送到车辆识别模块;所述车辆识别模块用于识别电动车辆,当识别成功时,通过充电模块对电动车辆进行充电;通过设置充电预约时间YT、等待计费价格JG和等待时长DT,督促用户在预约后能够按时到达停车位,避免预约后,也没有按时充电,造成资源的浪费。</摘要>\n",
84
+ "<判断依据>此发明利用了电动汽车充电预约系统,有智能优化方法,但未明确提及人工智能、物联网、量子信息等其他智能技术,主要依赖于电动汽车充电设备的智能化管理,因此可以归类为智能化专利。</判断依据>\n",
85
+ "<判断>是</判断>\n",
86
+ "\n",
87
+ "<摘要>本发明公开了一种超声成像方法及系统、存储介质、处理器和计算机设备。其中,该方法包括:获取胎儿头颅的三维体数据,其中,三维体数据是经超声对头颅进行扫查后得到的数据;分解三维体数据,生成预定数量的二维切面图像;分别对预定数量的二维切面图像进行分割,得到二维切面图像中颅内区域的轮廓;根据预定数量的二维切面图像中颅内区域的轮廓,拟合出头颅的三维颅脑轮廓;根据三维颅脑轮廓,确定头颅中颅脑的体积。本发明解决了相关技术中的测量方式,准确率较低,测量速度较慢的技术问题。</摘要>\n",
88
+ "<判断依据>此发明利用了超声成像技术,通过三维体数据处理和图像分割等方法,实现了对胎儿头颅的精确测量,体现了智能化处理和优化效果,属于智能化专利范畴。</判断依据>\n",
89
+ "<判断>是</判断>\n",
90
+ "\n",
91
+ "<摘要>一种锂离子电池正极活性物质磷酸亚铁锂的制备方法,该方法包括将高\\r\\n\\r\\n\\r\\n\\r\\n分子聚合物、磷源化合物、铁源化合物和锂源化合物混合后进行烧结,其中,\\r\\n\\r\\n\\r\\n\\r\\n所述铁源化合物为铁的非二价化合物;所述高分子聚合物、磷源化合物和锂\\r\\n\\r\\n\\r\\n\\r\\n源化合物与铁的非二价化合物的混合在溶液中进行,得到的混合溶液除去溶\\r\\n\\r\\n\\r\\n\\r\\n剂之后得到凝胶体,然后将所得凝胶体进行烧结。本发明选用铁的非二价化\\r\\n\\r\\n\\r\\n\\r\\n合物为原料,大大降低成本,而且制备方法简单易行。利用本发明方法制得\\r\\n\\r\\n\\r\\n\\r\\n的磷酸亚铁锂作为正极活性物质,使得电池具有较高的首次放电比容量和良\\r\\n\\r\\n\\r\\n\\r\\n好的循环性能。并且用本发明方法制得的磷酸亚铁锂成分固定、颗粒均匀、\\r\\n\\r\\n\\r\\n\\r\\n导电性好。</摘要>\n",
92
+ "<判断依据>此发明主要涉及电池制备方法,未明确提及使用了先进智能技术,如人工智能、物联网等。</判断依据>\n",
93
+ "<判断>否</判断>\n",
94
+ "\n",
95
+ "<摘要>本实用新型公开了一种水泵井壁支撑装置,用于实现水泵与井壁之间的分隔支撑,解决了现有类似装置的结构复杂,使用时不能保证顺畅的问题,所采取的技术方案:一种水泵井壁支撑装置,用于实现水泵与井壁之间的支撑,包括支撑件,支撑件包括用于联接在水泵壳体上的联接部,其特征在于,联接部上设有若干支撑部,这些支撑部在联接部的外周面上突出设置,这些支撑部呈放射状布置在联接部上。本水泵井壁支撑装置结构简单,造价低,使用稳定性好,能够为水泵与井壁之间提供良好的分隔支撑作用。 来自马克数据网</摘要>\n",
96
+ "<判断依据>此发明主要关注于水泵井壁支撑装置的结构设计,未提及使用任何智能技术,如人工智能、物联网等,因此主要依赖于物理结构的优化,而非智能技术提升效率或自动化。</判断依据>\n",
97
+ "<判断>否</判断>\n",
98
+ "\n",
99
+ "<摘要>本实用新型提供了一种翻转梁,包括底座、前盖,底座上设有导向结构,导向结构包括导向件、弹簧,导向件的一端从底座的上端对应开孔穿出,弹簧的一端连接于导向件,弹簧的另一端连接于底座,底座设有一对用于限制导向件直线移动的第一限位件。本实用新型提供的翻转梁及冰箱,其连接于底座与导向件之间的弹簧使得导向件可以伸缩,配合设于底座、前盖和导向件上的限位件,从而让导向凸起进入导向槽中并向下运动,待导向凸起脱离导向槽并进入导向凸起安装座中时利用弹簧的回复作用使导向件回到初始位置,同时在导向结构沿导向槽滑动的过程中起到缓冲的作用,并方便了弹簧的安装,同时导向件大部分结构位于翻转梁内部,开门时不影响冰箱的外观。</摘要>\n",
100
+ "\n"
101
+ ]
102
+ }
103
+ ],
104
+ "source": [
105
+ "print(autotab.query_example)"
106
+ ]
107
+ }
108
+ ],
109
+ "metadata": {
110
+ "kernelspec": {
111
+ "display_name": "common",
112
+ "language": "python",
113
+ "name": "python3"
114
+ },
115
+ "language_info": {
116
+ "codemirror_mode": {
117
+ "name": "ipython",
118
+ "version": 3
119
+ },
120
+ "file_extension": ".py",
121
+ "mimetype": "text/x-python",
122
+ "name": "python",
123
+ "nbconvert_exporter": "python",
124
+ "pygments_lexer": "ipython3",
125
+ "version": "3.11.5"
126
+ }
127
+ },
128
+ "nbformat": 4,
129
+ "nbformat_minor": 2
130
+ }