• Title/Summary/Keyword: LR 파싱

Search Result 21, Processing Time 0.025 seconds

Improvement of LR Parser using Reduction Goals (리덕션 골을 이용한 LR 파서의 개선)

  • Son, Yun-Sik;Oh, Se-Man
    • Journal of Korea Multimedia Society
    • /
    • v.11 no.5
    • /
    • pp.703-709
    • /
    • 2008
  • The methodology of the compiler construction improved by well-defined parsing techniques and developments of automatic generation tools. Through them, a variety of compilers for the special applications can be developed effectively: particularly, the compiler for embedded/mobile devices. Also, as contents industry is proliferating recently, the necessity of developing a compiler which is suitable for contents system is highly increasing. These various demands can be resolved by modular techniques and automatic construction of compilers. But, optimization of compiler itself as development tools uses heuristic methods and it needs higher cost. In this paper, we suggest the parsing method which can decrease unnecessary reduce actions by analyzing the characteristics of LR parser. The suggested parsing technique uses lookahead/ states, reachable reduction goals information in parsing process and enhances the parsing efficiency by changing continuous reduce actions to one. Actually, we applied it to the front-end of ANSI C compiler and proved the parsing performance in terms of the number of reduce actions.

  • PDF

A Model of Probabilistic Parsing Automata (확률파싱오토마타 모델)

  • Lee, Gyung-Ok
    • Journal of KIISE
    • /
    • v.44 no.3
    • /
    • pp.239-245
    • /
    • 2017
  • Probabilistic grammar is used in natural language processing, and the parse result of the grammar has to preserve the probability of the original grammar. As for the representative parsing method, LL parsing and LR parsing, the former preserves the probability information of the original grammar, but the latter does not. A characteristic of a probabilistic parsing automaton has been studied; but, currently, the generating model of probabilistic parsing automata has not been known. The paper provides a model of probabilistic parsing automata based on the single state parsing automata. The generated automaton preserves the probability of the original grammar, so it is not necessary to test whether or not the automaton is probabilistic parsing automaton; defining a probability function for the automaton is not required. Additionally, an efficient automaton can be constructed by choosing an appropriate parameter.

Morphological Processing with LR Techniques (LR 테크닉을 이용한 형태소 분석)

  • 이강혁
    • Korean Journal of Cognitive Science
    • /
    • v.4 no.2
    • /
    • pp.115-143
    • /
    • 1994
  • In this paper,I present an extended two-level model using LR parsing techniques.The LR-based two-level model not only guarantees effcient morphological processing but also achieves a higher degree of descriptive adequacy than Koskenniemi's original model.The two-level model is augmented with an independent morphosyntactic module based on feature-based CF word grammar.By adopting a CF word grammar,our model is capable of dealing with complex words with discontinuous dependencies without having duplicate lexicons.It is shown how LR predictions manifested in the parsing table can help the morphological processor to minimize the dictionary lookup process.

A One-Gap Parsing with Extended PLR(1) Grammars (확장된 PLR(1) 문법에 대한 단일 틈 파싱)

  • Lee, Gyung-Ok
    • Journal of KIISE
    • /
    • v.42 no.3
    • /
    • pp.361-366
    • /
    • 2015
  • Gap parsing is an algorithm for parsing incomplete input strings which include some gaps. Gap parsing is different from conventional parsing, and as known results, one-gap parsing algorithms for arbitrary context-free grammar and LL(1) grammar have $O(n^3)$ and $O(n^2)$ time complexity, respectively. This paper presents a one-gap parsing algorithm for extended PLR(1) grammars. Extended PLR(1) grammars are the class of grammars smaller than LR(1) but much larger than LL(1). The one-gap parsing algorithm of the grammar class is shown to have the time complexity of $O(n^2)$, which is equal to the complexity of one-gap parsing algorithms for LL(1) grammars.

Multi-path LR parsing for nonsegmental words using one-pass strategy (원-패스 전략을 사용하는 미분절어를 위한 다중-경로 LR 파싱)

  • Lee, Gi-O;Lee, Yong-Seok
    • Annual Conference on Human and Language Technology
    • /
    • 1994.11a
    • /
    • pp.146-154
    • /
    • 1994
  • 한국어는 단어들 사이에 공백이 없는 미분절어이기 때문에, 한국어를 분석하기 위해서는 단어의 경계를 식별하는 분절이 선행되어야 한다. 분절은 쉽지 않은 과정이고 잘못된 분절은 구문분석, 의미 분석 단계에서 심각한 오류를 유발하기 때문에 형태소 분석의 중요한 작업중의 하나가 되어왔다. 기존의 한국어 분석 시스템들은 분절의 어려움으로 인하여 입력 문자열의 끝까지 읽은 후, 우에서 좌로 분석하는 two-pass 전략이나 단어들 사이에 공백을 삽입하여 처리하는 방법을 사용하였다. 또한 이 시스템들은 형태소 분석이 완결된 후, 파서에게 결과를 전달하는 순차적인 전략을 사용하였다. 본 논문은 영어의 분석과 같이 형태소 분석 동안에 파싱을 할 수 있는 one-pass 전략을 사용하여 한국어를 효율적으로 처리하는 모델을 제안한다. 이를 위해 형태소 분석 방법으로써 확장된 최장일치법을 제시하며, 위 방법에서 생성되는 문제점인 다중-범주 구를 처리하기 위하여 다중-경로 LR 파싱을 제시한다.

  • PDF

(Prediction of reduction goals : deterministic approach) (리덕션 골의 예상: 결정적인 접근 방법)

  • 이경옥
    • Journal of KIISE:Software and Applications
    • /
    • v.30 no.5_6
    • /
    • pp.461-465
    • /
    • 2003
  • The technique of reduction goal prediction in LR parsing has several applications such as the computation of right context. An LR parser generating the set of pre-determined reduction goals was previously suggested. The set approach is nondeterministic, and so it is inappropriate in some applications. This paper suggests a deterministic technique to give a uniquely predictable reduction symbol.

A Research on the Efficient Type-Checking for an Expression Using LL and LR (LL과 LR에서의 효율적인 수식 타입 체킹에 대한 연구)

  • Chung, Yong-Ju
    • The Journal of the Institute of Internet, Broadcasting and Communication
    • /
    • v.11 no.1
    • /
    • pp.177-183
    • /
    • 2011
  • One of the methodologies for the type-checking of an expression is the attribute grammar. But this attribute grammar is difficult to write because two attributes should be used with the full understanding of parsing steps. So this paper proposes a methodology to construct an expression attribute grammar easily. It shows the possibility to check the type of an expression with only one attribute through a grammar construction method.

Korean Dependency Structure Analyzer based on Probabilistic Chart Parsing (확률적 차트 파싱에 기반 한 한국어 의존 구조 분석기)

  • Eun, Ji-Hyun;Jeong, Min-Woo;Lee, Gary Geun-Bae
    • Annual Conference on Human and Language Technology
    • /
    • 2005.10a
    • /
    • pp.105-111
    • /
    • 2005
  • 정형적인 프로그래밍 언어에서는 언어를 기계적으로 해석하기 위해 입력의 구조적인 형태를 구축하는 파싱이 필수적인 과정으로 여겨진다. 기계에 기반 해서 개발된 프로그래밍 언어와 달리, 인간의 자유로운 의사소통을 위해 형성된 자연어는 특유의 다양성으로 인해 어휘, 구문, 의미 분석이 매우 어렵다. 반대로 자연어 구조 분석이 성공적으로 이루어지면 응용 시스템의 성능 향상에 상당한 기여를 할 것이라고 여겨지고, 이로 인해 끊임없이 자연어 처리, 특히 구문 분석에 많은 연구가 이루어지고 있다. 본 논문에서는 파싱에 사용되는 문법 전체를 말뭉치로부터 자동 구축하여 영역별 이식성 및 문법의 효율성을 도모했다. 또한 확률적 차트 파싱 기법과 immediate-head 파싱 모델을 적용하여 기존 파싱 시스템의 성능 향상을 시도했다. 세종 말뭉치를 이용한 파서의 성능은 각각 LP/LR 78.98%/79.55%로 나타났다.

  • PDF

An Efficient Node Reuse inIncremental Parsing Algorithms (효율적인 노드 재사용을 위한 점진적 파싱 알고리즘)

  • 박정윤;김영철;김상헌;유재우
    • Proceedings of the Korean Information Science Society Conference
    • /
    • 1998.10b
    • /
    • pp.401-403
    • /
    • 1998
  • 점진적 파싱 알고리즘은 사용자 중심의 시스템 구현을 위한 핵심적인 기술의 하나이다. 오늘날 속성문법에서 사용되는 트리에는 노드에 파스서 상태와 심볼외에 평가된 속성 정보가 포함되므로 이 정보를 재사용하는 것이 바람직하다. 따라서 효율적인 점진적 파서는 파스트리상에서 생성된 노드를 효율적으로 재사용 할 수 있어야 한다. 본 연구에서는 이전의 파싱과정에서 생성된 노드를 효율적으로 재사용할 수 있는 쓰레드 트리를 기반으로 한 점진적 파싱 알고리즘을 제안하였다. 이전에 생성된 파스결과를 쓰레드 트리로 보관하고 이를 이용하여 효율적으로 노드를 재사용할 수 있도록 하였다. 제안된 알고리즘은 LR 기반의 파싱 방법에서 확장형 파싱표와 쓰레드 트리를 이용해 생성된 트리의 노드를 효율적으로 유지할 수 있다. 본 연구에서 제시된 알고리즘은 구문분석이 필요한 대화식 환경에서 효율적으로 사용될 수 있다.

An Extension of LL($textsc{k}$) Covering Grammers (LL($textsc{k}$) 커버링 문법의 확장)

  • Lee, Gyeong-Ok;Choe, Gwang-Mu
    • Journal of KIISE:Software and Applications
    • /
    • v.26 no.8
    • /
    • pp.1028-1038
    • /
    • 1999
  • 본 논문에선 LR 문법의 부분 클래스를 동치인 LL 문법으로 변환하는 방법을 제시한다. 이 변환이 적용 가능한 문법을 확장된k`-transformable 문법이라 정의한다. 변환된 문법은 left-to-right 커버의 성질을 만족한다. 기존 연구에서 제시한 변환 방법은 LR 문법의 부분 클래스인 {{{{k`-transformable 클래스와 PLR 클래스를 LL 문법으로 바꾼다. 이 논문에서 제시하는 새로운 변환 방법의 적용 가능한 문법의 범위는 k`-transformable 클래스와 PLR 클래스를 포함한다. 기존의 커버링 성질을 만족하는 LL로의 문법 변환은 보편적인 LR 파서의 행동을 시뮬레이션하여 얻어진다. 이 과정에서 쉬프트, 리듀스 행동 이외에 무한의 가능성을 가진 스택 스트링의 유한 표현을 위해 리덕션 심볼에 대한 예상 행동이 추가된다. 본 논문에서는 파싱 문맥을 나타내는 LR 아이템들을 기존의 스택 스트링 표현 형태에 추가하여 스택 스트링 표현법을 정제하고, 리덕션 심볼에 대한 예상 방법을 확장하는 정형식을 제시한다. 이에 근거하여 LL 커버링 문법이 존재하는 클래스를 확장된 {{{{k`-transformable 문법으로 확장시킨다.Abstract A new transformation of a subclass of LR(k`) grammars into equivalent LL(k`) grammars is studied. The subclass of LR(k`) grammars is called extended k`-transformable. The transformed LL(k`) grammars left-to-right cover the original LR(k`) grammars. Previous transformations transform k`-transformable and PLR(k`) into LL(k`). The new transformation is more powerful in that it handles the extended k`-transformable subclass of LR(k`), which strictly includes k`-transformable and PLR(k`) classes. The previous covering transformations into LL grammars are obtained by simulating the actions of the conventional LR parser. Specially, a predict action of reduction goals is added to the action set in order to finitely represent stack string. In this paper, the stack string representation is refined by adding LR items to represent a parsing context, and the prediction of reduction goal is extended by generalizing the prediction formalism. Based on them, the previous grammar classes with LL({{{{k`) covering grammars are extended to extended k`-transformable grammars.