Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lab 9 #13

Open
sevinjyolchuyeva opened this issue Dec 4, 2017 · 5 comments
Open

Lab 9 #13

sevinjyolchuyeva opened this issue Dec 4, 2017 · 5 comments

Comments

@sevinjyolchuyeva
Copy link

Hi, Could anyone please share Lab 9 task solutions?

@DavidNemeskey
Copy link
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.

@sevinjyolchuyeva
Copy link
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)

@DavidNemeskey
Copy link
Collaborator

DavidNemeskey commented Dec 4, 2017

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')

@DavidNemeskey
Copy link
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!

@sevinjyolchuyeva
Copy link
Author

Thank you very much.

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

No branches or pull requests

2 participants