我认为你应该尝试Natural Language Understanding服务。这里是一个演示,可以让你分析文本和提取概念和关键字https://natural-language-understanding-demo.mybluemix.net/。
我建议你先到read the documentation,然后看看API Reference,你会发现如何调用这个方法来提取基于不同语言的关键字和概念。
你需要做的是循环浏览你的文件,读取内容然后发送给NLU。
下面是如何分析的文本中提取概念和关键字Node.js的一个例子:
const NaturalLanguageUnderstandingV1 = require('watson-developer-cloud/natural-language-understanding/v1.js');
const service = new NaturalLanguageUnderstandingV1({
'username': '{username}',
'password': '{password}',
'version_date': '2017-02-27'
});
const parameters = {
text: 'IBM is an American multinational technology company headquartered in Armonk, New York, United States, with operations in over 170 countries.',
features: {
keywords: {
emotion: true,
sentiment: true,
limit: 2
},
concepts: {
limit: 3
}
}
}
service.analyze(parameters, (err, response) => {
if (err)
console.log('error:', err);
else
console.log(JSON.stringify(response, null, 2));
});
我同意NLU将是首选。根据文件NLU不接受文件。只是原始文本,HTML和网址。这是一个小问题,因为我想分析超过200个文档。 – RileyZ71
我已经更新了我的答案,提供了更多信息和代码片段,以便您在Node.js中执行什么操作 –