Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/278.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python i';I’我试图从每个句子中得到表达_Python_Regex - Fatal编程技术网

Python i';I’我试图从每个句子中得到表达

Python i';I’我试图从每个句子中得到表达,python,regex,Python,Regex,我试着从大量的参考文献中找出一些不同类型的句子 Goldberg, Yoav (2016). "A Primer on Neural Network Models for Natural Language Processing". Journal of Artificial Intelligence Research. 57: 345–420. arXiv:1807.10854. Goodfellow, Ian; Bengio, Yoshua; Courville, Aaron (2016).

我试着从大量的参考文献中找出一些不同类型的句子

Goldberg, Yoav (2016). "A Primer on Neural Network Models for Natural Language Processing". Journal of Artificial Intelligence Research. 57: 345–420. arXiv:1807.10854.

Goodfellow, Ian; Bengio, Yoshua; Courville, Aaron (2016). Deep Learning. MIT Press.

Choe, Do Kook; Charniak, Eugene. "Parsing as Language Modeling". EMNLP 2016.

Vinyals, Oriol; et al. "Grammar as a Foreign Language" (PDF). NIPS2015.

Winograd, Terry (1971). Procedures as a Representation for Data in a Computer Program for Understanding Natural Language (Thesis).

Schank, Roger C.; Abelson, Robert P. (1977). Scripts, Plans, Goals, and Understanding: An Inquiry Into Human Knowledge Structures. Hillsdale: Erlbaum. ISBN 0-470-99033-3.

Mark Johnson. How the statistical revolution changes (computational) linguistics. Proceedings of the EACL 2009 Workshop on the Interaction between Linguistics and Computational Linguistics.

Philip Resnik. Four revolutions. Language Log, February 5, 2011.

Kishorjit, N.; Vidya, Raj RK.; Nirmal, Y.; Sivaji, B. (2012). "Manipuri Morpheme Identification" (PDF). Proceedings of the 3rd Workshop on South and Southeast Asian Natural Language Processing (SANLP). COLING 2012, Mumbai, December 2012: 95–108.

Mittal (2011). "Versatile question answering systems: seeing in synthesis". IJIIDS. 5 (2): 119–142. doi:10.1504/IJIIDS.2011.038968.

PASCAL Recognizing Textual Entailment Challenge (RTE-7) https://tac.nist.gov//2011/RTE/

Yi, Chucai; Tian, Yingli (2012), "Assistive Text Reading from Complex Background for Blind Persons", Camera-Based Document Analysis and Recognition, Springer Berlin Heidelberg, pp. 15–28, CiteSeerX 10.1.1.668.869, doi:10.1007/978-3-642-29364-1_2, ISBN 9783642293634
这是参考资料

Goldberg, Yoav (2016). "A Primer on Neural Network Models for Natural Language Processing". Journal of Artificial Intelligence Research. 57: 345–420. arXiv:1807.10854.

Goodfellow, Ian; Bengio, Yoshua; Courville, Aaron (2016). Deep Learning. MIT Press.

Choe, Do Kook; Charniak, Eugene. "Parsing as Language Modeling". EMNLP 2016.

Vinyals, Oriol; et al. "Grammar as a Foreign Language" (PDF). NIPS2015.

Winograd, Terry (1971). Procedures as a Representation for Data in a Computer Program for Understanding Natural Language (Thesis).

Schank, Roger C.; Abelson, Robert P. (1977). Scripts, Plans, Goals, and Understanding: An Inquiry Into Human Knowledge Structures. Hillsdale: Erlbaum. ISBN 0-470-99033-3.

Mark Johnson. How the statistical revolution changes (computational) linguistics. Proceedings of the EACL 2009 Workshop on the Interaction between Linguistics and Computational Linguistics.

Philip Resnik. Four revolutions. Language Log, February 5, 2011.

Kishorjit, N.; Vidya, Raj RK.; Nirmal, Y.; Sivaji, B. (2012). "Manipuri Morpheme Identification" (PDF). Proceedings of the 3rd Workshop on South and Southeast Asian Natural Language Processing (SANLP). COLING 2012, Mumbai, December 2012: 95–108.

Mittal (2011). "Versatile question answering systems: seeing in synthesis". IJIIDS. 5 (2): 119–142. doi:10.1504/IJIIDS.2011.038968.

PASCAL Recognizing Textual Entailment Challenge (RTE-7) https://tac.nist.gov//2011/RTE/

Yi, Chucai; Tian, Yingli (2012), "Assistive Text Reading from Complex Background for Blind Persons", Camera-Based Document Analysis and Recognition, Springer Berlin Heidelberg, pp. 15–28, CiteSeerX 10.1.1.668.869, doi:10.1007/978-3-642-29364-1_2, ISBN 9783642293634
正如你所看到的,每个句子都是不同的,每次我试图从参考文献中得到一个特定的句子,并不是所有的句子都是正确的

这是我尝试过的表达方式之一
([.])(?看起来您要匹配的所有句子都紧跟在以下句子之后:


  • 后跟空格的句点,(与
    (?谢谢,现在开始的句子是正确的,但问题是句子没有在正确的时间段停止。您的问题没有指定您希望匹配在某一点结束。可能您希望更改为类似“添加到模式结尾”-只匹配到另一个
    。最后一个参考是问题atic,因为它使用的是
    分隔符,而不是
    分隔符。我认为没有
    sthank you,对于这种格式,通用正则表达式解决方案是不可能的,尽管我仍然对表达式感到困惑,至少我可以从中学习。另一个问题,我有这个表达式
    ^([^.]+)
    它应该从每个引用中获取每1个句子。但它仅获取第一个引用。如何操作?请确保使用多行标志,否则
    ^
    将仅匹配字符串的开头