python - 使用 Python + NLTK 提取文本块
问题描述
我正在寻找一种通过使用 Python 和 NLTK 识别模式来提取文本块的方法。
我有下面的文字,需要提取问题的相应文字和每个备选方案。
QUESTION 01
For a p-type semiconductor, which of the following statements is true?
A Holes are the majority carriers and pentavalent atoms are the dopants.
B Electrons are the majority carriers and pentavalents atms are the dopants.
C Electrons are the majority carriers and trivalent atoms are the dopants.
最好的方法是对“问题”实体使用一种模式,对“替代”实体使用其他模式?
解决方案
推荐阅读
- html - 如何制作在大屏幕上以最大宽度和高度显示并在小屏幕上保持其比例的响应元素
- javascript - 为什么当我更改第二个时第一个 CSS 变量会重置?自定义颜色主题
- mysql - 我想使用套接字从 MySQL 中获取数据实时数据
- r - 绘制直方图,但不知道为什么相对频率显示大于 1
- javascript - 如何在 React Beautiful DND 中获取移动对象的位置(xy 坐标)?
- docker - Erlang:docker容器内的oom
- javascript - 多边形裁剪:如何在中间裁剪两个多边形?
- c++ - C++ 错误:没有用于调用“reverse(char*&)”的匹配函数
- mongodb - 从 CSV 文件导入到 Mongo 时如何保留 Guid?
- swift - 如何从 ScrollView 生成 PDF - SwiftUI