GithubHelp home page GithubHelp logo

jossl123 / ccg_parser_in_haskell Goto Github PK

View Code? Open in Web Editor NEW

This project forked from satomichi/ccg_parser_in_haskell

0.0 0.0 0.0 37 KB

Parser of CCG (Combinatory Categorial Grammar) implemented in Haskell

License: MIT License

Haskell 100.00%

ccg_parser_in_haskell's Introduction

CCG_Parser_in_Haskell

Parser of CCG (Combinatory Categorial Grammar) implemented in Haskell
HaskellによるCCG (組み合わせ範疇文法) パーサーの実装

What is CCG (Combinatory Categorial Grammar)

CCGはProfessor. Mark Steedmanによって提案された文法理論の一つである。CFG(文脈自由文法)などに代表される文法との違いは各単語が各カテゴリ(自然言語でいえば形態素など)に加えてセマンティクスを担う部分として型付きラムダ式を保持している点であるといえる。
CCG is a grammatical theory proposed by Professor. Mark Steedman, which differs from grammars such as CFG (Context-Free Grammar) in that each word has a typed lambda expression as its semantics in addition to its category (e.g. part of speech tag in natural language).

例(example):
ccg1
A/B = function which takes category B at the right side and return category A
A\B = function which takes category B at the left side and return category A

There is several gramatical rules:

Application combinators
ccg2
">" = forward composition applying function forward (left to right)
"<" = backward composition applying function backward (right to left)

Composition combinators
ccg3

Type-raising combinators
ccg4

Substitution

(X/Y)/Z Y/Z => X/Z 
(X/Y)\Z Y\Z => X\Z
Y\Z (X\Y)\Z => X\Z
Y/Z (X\Y)/Z => X/Z

retireved from https://qiita.com/q-ikawa/items/cf1bb593185333d88d66

Example of Proof:
ccg5

In the above steps, we only forcused on category of the each words and (sub-)sentence since we only concentrated on the category of the word and sentences. However by combining semantic lambda function, it is possible to construct the semantic of the whole sentence from semantic of each words.

Example of Proof with semantic:
ccg6
image from (Lee, K. et al, 2014)

References

ccg_parser_in_haskell's People

Contributors

satomichi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.