Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Algorithms Parsing Parser , +
I wanna design Chomsky Normal Form (CNF) for English Pattern. I've designed it for two days, but I got stuck. I'm not good at Natural Language Processing but I have assignment about it. Firs one, I wanna design CNF for Present Tense, here the formula :
 
Active : S + V/(ToBe)
Passive : S + ToBe + V3
 
Those formula looks simple, but production rule that I've designed work bad to accept those formula.
 
Here the production rule (so ambiguous), please tell me how to improvise it. Smile | :) Smile | :) Smile | :)
 
NP : NounPhrase
VP : VerbPhrase
Det : Determiner
Quant : Quantifier
PP : Prepositional Phrase
Vtran : transitive verb
Vint : intransitive verb
Vpass : passive verb
VLink : linking verb
VC : causative verb
 
Sentence        ->  NP VP
                | Sentence CS
 
    CS      ->  Conj Sentence
 
    NP      ->  Pronoun     they, them
                | Det NP1
                | Quant NP1
                | NP1 PP    
                | NP RelClause              
 
    VP      ->  Vtran NP            read a book
                | ToBe NP           is a book
                | Vpass  NP         is designed
                | ToBe Adverb           is quite quickly
                | ToBe PP               is in the hospital
                | Vlink Adjective   looks beautiful
                | Vint PP           rest in the den
                | Vint Adverb       weep copiously
                | Vto TO-V1         am happy to know
                                    want to hear
                | VC NV             make you cry
                | ToBe  TO-V1       is to help      
                | Modal V1          can hear
                | Modal BE          can be read
                | intransitive      weep            
 
    NP1     ->  pronoun             they, them
                | Adjective Noun
                | Det NP1
                | Noun
 
    NP2     ->  Adjective Noun
                | Det NP1
                | Noun
 
    NV      ->  NP Vtrans       have you write
                NP Vint         make you cry
 
    VC      ->  causative       make    
 
    PP      ->  Prep NP
                | Gerund PP          talking to Joko 
 
    RelClause   ->  That [Noun | VP]    that I
                | Which [Noun | VP] which I
                | Who VP            who is cruelly
                | Whom Noun         whom we
                | Whose Noun        whose father
 
    Vint        ->  intransitive    wept
 

    Vto     ->  ToBe Adjective      am happy
                Vto                 want, need
 
    TO-V1       ->  TO Vtrans       to know
 
    VPP     ->  had | has | have
 
    Vpass       ->  ToBe Verb3      is designed
 
    Verb3       ->  verb3           designed
 
    BEING       ->  being verb3     being designed
 
    BEEN        ->  BEEN Adjective  been colorful
                | BEEN Verb3        been stolen
                | BEEN NP2          been a teacher
                | been
 
    Noun        ->   noun           book
                | name              Indonesia
                | gerund            studying
                | number            three
 
    Det     ->  determiner          the, a , an, my, our
 
    Quant       ->  Quant NP        all those book      
                quantifier          some, all, both of
 

    Adjective   ->  Adjective Adjective  beautiful red
                | adjective              beautiful
 
    Adverb      ->  adverb          quickly
                | Adverb NP         carefully in a vase
 
    Modal       ->  modal           can
                | Modal NOT         can not
 
    BE      ->  BE Verb3            be designed
                | BE Adjective      be beautiful
                | BE NP1            be nice activity
                | be
 

Example :
 
INPUT :
 
"My    friend     are     at     the     library"
 
 Det   NP1(Noun)  ToBe    Prep   Det     NP1(Noun)
    NP             |       |        NP
     |             |       PP
     |             |       |
     |             VP
     |             |
       Sentence
 
I think that rule so complex, please help me to make it efficient and good. :) :)
Posted 27-Mar-13 18:46pm
Comments
Sergey Alexandrovich Kryukov at 27-Mar-13 23:58pm
   
All these "tons of calculus" ™ still don't make it a question :-)
—SA
Berry Harahap at 28-Mar-13 0:03am
   
Any suggestion Sir @SAK?
I wanna parse English by using CYK(Cocke-Younger-Kasami) Algorithm. I should designed CNF before using that algorithm.
Kenneth Haugland at 28-Mar-13 0:06am
   
See my comment :-)
Sergey Alexandrovich Kryukov at 28-Mar-13 0:16am
   
Well, certainly needs a good amount of thinking. :-)
—SA
Kenneth Haugland at 28-Mar-13 0:06am
   
I dont know if there are many lingvistist currently on this forum. I have just seen one article were the author said he is a lingvist and that is:
http://www.codeproject.com/Articles/21183/In-Depth-with-NET-RegEx-Balanced-Grouping
 
He might have a better luck in asking this kind of "question" on one of his articles instead.
Berry Harahap at 28-Mar-13 0:29am
   
Thanks a log @Kenneth Haugland
 
I'll try and conceive that articles. :) :) :)
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 587
1 Sergey Alexandrovich Kryukov 479
2 Maciej Los 305
3 BillWoodruff 220
4 Mathew Soji 195
0 OriginalGriff 7,356
1 Sergey Alexandrovich Kryukov 6,817
2 DamithSL 5,461
3 Manas Bhardwaj 4,946
4 Maciej Los 4,475


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 27 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100