【发布时间】:2021-02-14 14:06:33
【问题描述】:
我在 JavaScript 中有这行,但我想知道 Python 中的等价物。
const { entities, classification } = obj
完整的功能是:
function extractActionEntities (lang, expressionsFilePath, obj) {
return new Promise(async (resolve, reject) => {
log.title('NER')
log.info('Searching for entities...')
// Need to instanciate on the fly to flush entities
this.nerManager = new NerManager()
const { entities, classification } = obj
// Remove end-punctuation and add an end-whitespace
const query = `${string.removeEndPunctuation(obj.query)} `
const expressionsObj = JSON.parse(fs.readFileSync(expressionsFilePath, 'utf8'))
const { module, action } = classification
const promises = []
});
}
【问题讨论】:
-
Stack Overflow 不是代码编写服务,在提出问题之前,您至少必须诚实地尝试解决您的问题。
-
也许你不明白,或者我没有让自己明白。我不想让他们为我写代码,我只想知道我是如何在 Python 中做到这一点的。
-
我的错,我没有注意 line 部分。如果您想编辑问题中的任何内容,我可以删除 downvote 投。
-
抱歉,我无法删除该行,我不想添加该行,但 Stack Overflow 的政策迫使我这样做。没关系,我得到了答案。
标签: javascript python