Skip to content

Lab 9 #13

Open
Open

Description

@sevinjyolchuyeva

Hi, Could anyone please share Lab 9 task solutions?

Activity

  1. DavidNemeskey commented on Dec 4, 2017

    @DavidNemeskey
    Collaborator

    Please note that solving exercises H1-5 is part of the homework. This is the main reason why they are not uploaded. Similarly with lab 10, where you had to implement CKY and PCKY is one of the homework exercises.

    You are encouraged to ask specific questions about the parts you are stuck with, though.

  2. sevinjyolchuyeva commented on Dec 4, 2017

    @sevinjyolchuyeva
    Author

    Thanks for the response. I didn't attend that lectures. Please only share solutions of Task W1-3 (warm-up tasks, not H1-5)

  3. DavidNemeskey commented on Dec 4, 2017

    @DavidNemeskey
    Collaborator

    W1:

    grammar = """
    LEXICON Root
    pack # ;
    talk # ;
    walk # ;
    """
    
    compile_lexc(grammar, 'warm_up.fst')
    draw_net('warm_up.fst')

    W2:

    grammar = """
    LEXICON Root
    ! see how the continuation changes to the new LEXICON
    ! BTW this is a comment
    pack Infl ;
    talk Infl ;
    walk Infl ;
    
    LEXICON Infl
    ! add the endings here, without the hyphens
    0    # ;
    s    # ;
    ed   # ;
    ing  # ;
    """
    
    compile_lexc(grammar, 'warm_up.fst')
    draw_net('warm_up.fst')

    W3:

    grammar = """
    LEXICON Root
    ! see how the continuation changes to the new LEXICON
    ! BTW this is a comment
    pack Infl ;
    talk Infl ;
    walk Infl ;
    
    LEXICON Infl
    ! add the endings here, without the hyphens
           # ;
    0:s    # ;
    0:ed   # ;
    0:ing  # ;
    """
    
    compile_lexc(grammar, 'warm_up.fst')
    draw_net('warm_up.fst')
  4. DavidNemeskey commented on Dec 4, 2017

    @DavidNemeskey
    Collaborator

    This + the code snippet at the end of the lecture slides should give you enough ideas of how lexc works. Start solving H1-5 and post another question if you are stuck. Good luck!

  5. sevinjyolchuyeva commented on Dec 4, 2017

    @sevinjyolchuyeva
    Author

    Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions