当前位置: 首页 > 工具软件 > AllenNLP > 使用案例 >

求助Python编程错误allennlp.common.checks.ConfigurationError

锺离明煦
2023-12-01

在运行rxn4chemistry 的from chemdataextractor import Document.py

from chemdataextractor import Document

doc = Document('To a mixture of Cu(OAc)2.H2O (0.01 mmol, 1.0 mol%) and 1,2- bis(diphenylphosphaneyl)benzene (0.015 mmol, 1.5 mol%) in an oven dried Schlenk tube connected to a CO2 balloon, a solution of PMHS (cas: 613-152-3, 2.5 mmol, 2.5 equiva.) in 1,4-dioxane (2.0 mL) was added, flushed the tube with CO2 and heated the resulting blue solution to 65 ℃ while vigorously stirring for 20 minutes under balloon pressure CO2 and the solution becomes light brown. This formate solution was removed from the heating bath and added toluene (8 ml), 1-chloro-4-nitrobenzene (1.0 mmol, 1.0 equiv.), Pd(OAc)2 (3 mol%, 0.03 equiva.), xantphos (6 mol%, 0.06 equiva.) and Et3N (2.5 mmol, 2.5 equiva.) sequentially under CO2 atmosphere. CO2 was removed, the Schlenk tube was closed and heated to 100 ℃ for the time period until the disappearance of aryl chloride as shown by TLC. Then, the reaction mixture was cooled to ambient temperature and added 10 ml of 1N NaOH or NaHCO3 and stirred for 10 min. The resulting emulsion was filtered and the filtrate was extracted with EtOAc (3*15 mL), organic fractions separated and discarded. Aqueous layer was acidified with 1.0 N HCl or citric acid and extracted with EtOAc (3*15 mL). The later organic fractions were dried over Na2SO4 and concentrated to get 4-nitrobenzoic acid (100 mg, 60%).')

doc.cems

doc.records

时出错:

allennlp.common.checks.ConfigurationError: conll2003onlyner not in acceptable choices for dataset_reader.type: ['babi', 'conll2003', 'interleaving', 'multitask', 'multitask_shim', 'sequence_tagging', 'sharded', 'text_classification_json']. You should either use the --include-package flag to 
make sure the correct module is loaded, or use a fully qualified class name in your config file like {"model": "my_module.models.MyModel"} to have it imported automatically.

电脑中找不到conll2003onlyner这个文件(夹),请教各位高手如何解决,谢谢!

 类似资料: