在python中学习解析器 [英] Learning parser in python

查看:108
本文介绍了在python中学习解析器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

回想一下,我已经读过一个解析器,您只需要提供一些示例行,它就可以知道如何解析一些文本.

I recall I have read about a parser which you just have to feed some sample lines, for it to know how to parse some text.

它只是确定两行之间的差异,以了解可变部分是什么.我以为它是用python编写的,但是我不确定.有谁知道那是什么图书馆?

It just determines the difference between two lines to know what the variable parts are. I thought it was written in python, but i'm not sure. Does anyone know what library that was?

推荐答案

可能您是说 TemplateMaker ,我还没有尝试过,但是它基于经过充分研究的最长公共子字符串算法,因此应该可以正常使用...如果您感兴趣通过不同(更复杂)的方法,您可以使用查询包装器归纳"或模板归纳"轻松地在Google学术搜索中找到很多资料.

Probably you mean TemplateMaker, I haven't tried it yet, but it builds on well-researched longest-common-substring algorithms and thus should work reasonably... If you are interested in different (more complex) approaches, you can easily find a lot of material on Google Scholar using the query "wrapper induction" or "template induction".

这篇关于在python中学习解析器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆