Partial parsing: Combining choice with commitment

被引:0
|
作者
Wallace, Malcolm [1 ]
机构
[1] Univ York, York YO10 5DD, N Yorkshire, England
关键词
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Parser combinators, often monadic, axe a venerable and widely-used solution to read data from some external format. However, the capability to return a partial parse has, until now, been largely missing. When only a small portion of the entire data is desired, it has been necessary either to parse the entire input in any case, or to break up the grammar into smaller pieces and move some work outside the world of combinators. This paper presents a technique for mixing lazy, demand-driven, parsing with strict parsing, all within the same set of combinators. The grammar specification remains complete and unbroken, yet only sufficient input is consumed to satisfy the result demanded. It is built on a combination of applicative and monadic parsers. Monadic parsing alone is insufficient to allow a choice operator to coexist with the early commitment needed for lazy results. Applicative parsing alone can give partial results, but does not permit context-sensitive grammars. But used together, we gain both partiality and a flexible ease of use. Performance results demonstrate that partial parsing is often faster and more space-efficient than strict parsing, but never worse. The trade-off is that partiality has consequences when dealing with ill-formed input.
引用
收藏
页码:93 / 110
页数:18
相关论文
共 50 条
  • [31] HISTORY - CHOICE AND COMMITMENT - GILBERT,F
    GRENDLER, PF
    [J]. HISTORIAN, 1978, 40 (04): : 729 - 730
  • [32] The Effect of Prior Commitment on Consumer Choice
    Demoliner, Sergio da Silva
    Damacena, Claudio
    [J]. SAGE OPEN, 2019, 9 (02):
  • [33] THE PASSION OF THE POSSIBLE - CHOICE, MULTIPLICITY, AND COMMITMENT
    GREENE, M
    [J]. JOURNAL OF MORAL EDUCATION, 1990, 19 (02) : 67 - 76
  • [34] HISTORY - CHOICE AND COMMITMENT - GILBERT,F
    KELLNER, H
    [J]. PACIFIC HISTORICAL REVIEW, 1978, 47 (03) : 473 - 474
  • [35] HISTORY - CHOICE AND COMMITMENT - GILBERT,F
    WHITFIELD, JH
    [J]. RENAISSANCE QUARTERLY, 1979, 32 (03) : 371 - 374
  • [36] HISTORY - CHOICE AND COMMITMENT - GILBERT,F
    KELLEY, DR
    [J]. AMERICAN HISTORICAL REVIEW, 1978, 83 (02): : 401 - 402
  • [37] Combining Parsing Information With Joint Structure for Human Pose Estimation
    Feng, Shenming
    Li, Xiying
    Hu, Haifeng
    [J]. IEEE ACCESS, 2020, 8 : 123408 - 123418
  • [38] Partial parsing via finite-state cascades
    Univ of Tuebingen, Tuebingen, Germany
    [J]. Nat Lang Eng, pt 4 (337-344):
  • [39] Filtering-Ranking Perceptron Learning for Partial Parsing
    A. Xavier Carreras
    B. Lluís Màrquez
    C. Jorge Castro
    [J]. Machine Learning, 2005, 60 : 41 - 71
  • [40] Filtering-ranking perceptron learning for partial parsing
    Carreras, X
    Màrquez, L
    Castro, J
    [J]. MACHINE LEARNING, 2005, 60 (1-3) : 41 - 71