👑 Easy-to-use and powerful NLP and LLM library with 🤗 Awesome model zoo, supporting wide-range of NLP tasks from research to industrial applications, including 🗂Text Classification, 🔍 Neural Search, ❓ Question Answering, ℹ️ Information Extraction, 📄 Document Intelligence, 💌 Sentiment Analysis etc.
[Bug]: ValueError:(InvalidArgument) Variable value (input) of OP(fluid.layers.embeding) expected >=0 and < 40000, but got 236693.please check input value. #6398
index=0
for x in os.listdir(zh_target_path):
content_text=open(zh_target_path+"/"+x,"r").read()
js_arr_dict=my_ie("I love you. many man,many many many man!girls,i love girls!")
if "target" in js_arr_dict[0]:
badian=""
for x in js_arr_dict[0]['target']:
badian=x["text"]+","+badian
ba_list.append(badian)
else:
ba_list.append("")
text_list.append(content_text)
index=index+1
软件环境
重复问题
错误描述
稳定复现步骤 & 代码
from pprint import pprint from paddlenlp import Taskflow import json import pandas as pd import os
schema = ['target']
my_ie = Taskflow("information_extraction", schema=schema,task_path='uie-m-base') zh_target_path="/data/NLP/test/wei-test/hotnews_en"
outfile="/data/NLP/test/wei-test/medical_rs/test_target_test100_base_en.xlsx" text_list=[] ba_list=[] yaoming_list=[]
index=0 for x in os.listdir(zh_target_path): content_text=open(zh_target_path+"/"+x,"r").read() js_arr_dict=my_ie("I love you. many man,many many many man!girls,i love girls!")
result_excel = pd.DataFrame() result_excel["文本"] = text_list result_excel["target"] = ba_list result_excel.to_excel(outfile)