If you have an email ending in @hotmail.com, @live.com or @outlook.com (or any other Microsoft-related domain), please consider changing it to another email provider; Microsoft decided to instantly block the server's IP, so emails can't be sent to these addresses.
If you use an @yahoo.com email or any related Yahoo services, they have blocked us also due to "user complaints"
-UE

Coding

edited 2011-05-21 06:29:54 in Meatspace
Pony Sleuth
The frustration of trying to get my programs to work might be the only thing that's gotten me legitimately angry in years.

I wish they'd provide clearer examples of what we're supposed to do.
«1

Comments

  • Are you using Flash, by any chance?
  • What language are you using, and yes there needs to be clearer examples or at least decent documentation in any language.
  • edited 2011-05-21 15:05:11
    Pony Sleuth
    It's an assignment for computational linguistics, and I'm using a program called LKB. I believe it uses Lisp or something like that?

    Anyway, I need to tag the parts of speech for the words in the lexicon and the rules in the grammar to make sure it parses only grammatical parses for the test sentences.
  • I'm trying to parse the assignment and having trouble
  • Yeah, I dunno if I can explain it properly without pasting the directions.
  • From what I can gather you are trying to make a grammar checker. So if I am correct something like
    The dog ran
    would pass while
    ran the dog
    would not.

  • edited 2011-05-21 15:37:44
    Pony Sleuth
    Yeah, but there's already a grammar system in place that I just have to modify to make sure there's proper agreement. Like, I have to make sure "that" is listed in the lexicon with a singular feature and "dogs" is listed with a plural feature, and I think I have to modify the grammar to reject parses with phrases that combine the two. I think something like "ran the dog" already won't parse, but "that dogs ran" parses and I need to fix that.

    I just don't think I understand the syntax I need to use to tell the program. I tried taking it one step at a time to test things out, but it's sort of like one of those puzzles where you have to change more than one thing at a time to make progress, so you can't know whether a single step you take is helping or not.
  • I get the frustration with not understanding the syntax.  If I could see a small sample of the syntax I might be able to point you in the right direction.
  • edited 2011-05-21 15:53:20
    Pony Sleuth
    Huh, looks like the assignment description isn't password protected, so I guess it won't hurt to link it.


    I think syntax examples are listed in Part 1, but I'm not sure I understand them. Hmm... that might not be enough information for you to help me, but I'm not sure how much would be okay to give.
  • That was plenty of information to work on, here's how I understand things the
     [value1 #same,value2 #same]
    construct will eval to true only when value1==value2 so change the rules to check for the quantity on each rule and define the quantity for each word.
    ex.
    fish:= n & [ FORM "fish" ,HEAD.AGREEMENT.NUMBER sg].

    rt := rt & [ ARGS < p, np >,p.
    HEAD.AGREEMENT.NUMBER #same
    np.HEAD.AGREEMENT.NUMBER #same
     ].
    I think that how it works.
  • edited 2011-05-21 17:11:35
    Pony Sleuth
    I think I'm closer to understanding it, but I'm still having trouble figuring out how to work the grammar rules.

    Wait, maybe I didn't get that right at all. I'm getting this big block of error messages. Maybe I'll come back to this on Monday. I've got a presentation in another class then I have to prepare for on that day and this isn't due until Wednesday.
  • edited 2011-05-21 18:15:27
    Tech support
    After playing around with it for a while I was wrong with what #same does and a few other things. I also give up on it further.
  • I'd like to ask a question on the class's forum, but I wouldn't know how to ask it.
  • edited 2011-05-25 06:58:28
    Pony Sleuth
    Fuck fuck fuck fuck fuck.

    Someone asked a question on the course's forum that seemed to apply and helped me out. I'm pretty sure I figured out the lexicon. But... that's about it. Can't seem to figure out the proper syntax for grammar rules.

    Fucking waste of an all-nighter.
  • Hopefully this is not too late, but here is how you create rules/types. 
    types are created by creating inheriting from another type and applying the feature constraint you want
    ex vs:= v & [HEAD.AGREEMENT.NUMBER sl].
    rules you can just copy and paste and change the args
    ex vps2 := vp & [ ARGS < vs > ].
         vps1 := vp & [ ARGS < vs, np > ].
  • edited 2011-05-25 15:06:28
    Pony Sleuth
    I thought for a minute I got it figured, but it keeps giving me a rule without daughters error message.

    Sure would be nice if it tole me which rule it was.
  • Okay, I think my main problem is figuring out how to use #same. The instructions don't seem clear on that.
  • I got it figured out! Unfortunately, there's another part of the assignment that I have 10 minutes left to do and I have no clue about how to start.
  • I am Dr. Ned who is totally not Dr. Zed in disguise.
    WWTSD?
  • She'd probably flip her shit worse than I ever could.

    Imma take a nap.
  • Try to get an extension or turn in what you have. 
  • edited 2011-05-25 23:38:27
    Pony Sleuth
    I did both. Let's see what happens.

    I'm very grateful for your help, by the way.
  • Okay, they'll let me turn the rest in for partial credit, but I'm having more trouble. This time it has to do with dependencies.

    I might be able to figure some of this out on my own, actually, but it looks like rough going. This isn't really a plea for help right now, but I suppose it could turn into one.
  • At least you got some extra time for part of it and you are welcome.
  • Um... let's see.

    This next part I have to make the types inherit constraints from their mother/ancestor types so similar rules don't have to be re-entered for each one. I think I have it figured out except I can't figure out how to write an agreement constraint for phrase structures with multiple constituents. Like, if XP can contain X or X and Y, but it has to share features with X in either case, I can't figure out how to make it accept both cases.

    Hmm... I thought I had something for a minute there.
  • I think figured it out, first I would create a new type TestBase and have it inherit what XP would have inherited. Then I would change the the XP type to inherit TestBase. Then I would create two rules. One that just accepts X and one that Accepts X and Y. The rules would inherit from TestBase. Then you just need to define the rules. Hopefully that makes sense.
  • I'm not sure it does. Jeez, I don't know how I could be so bad at this...
  • Would an example help. Well you are getting one.
    before
    In rules
    XP1:=XP & [ARGS].
    XP2:=XP & [ARGS].
    in types
    XP:=sign.
    after
    In types
    rbase:=sign.
    XP=rbase.
    In rules
    r1:=rbase &[ARGS].
    r2:=rbase &[ARGS,ARGS.HEAD... #same,ARGS.REST... #same].
  • edited 2011-05-29 00:47:37
    000
    You just reminded me that I need to figure out how to add numbers to an array, check to make sure duplicate numbers are not added, find a way to make other arrays use these numbers to to see what object they need to access, and do this all with the clusterfuck that is NSMutableArray.

    This shouldn't be so difficult...
  • Yeah, this kind of stuff makes me feel so stupid.
Sign In or Register to comment.