last day (18 days later) » 

01:45
1
A: Rule-based or Statistics-based approach for generating plain language grammar rules from a text

Andrew AlexanderOk, so I've got a basic example in code - I'll ultimately write my algorithm to be more efficient and right now it is only written for the one use-case (I haven't generalized it/made it so that you can have multiple daughters under a rule yet), but right now I'm just writing it out for one single...

These Python lines of code do not work for me :(
You're using the Zhong grammar and have ACE & PyDelphin installed?
(sorry ignore my previous comment) Yep. But, it seems like to me that it says "NOTE: parsed 1 / 2 sentences, avg 231451k, time 0.95741s" to me. I've been confused that it only parsed 1 when I run it.
Yeah, I'm not quite sure on the parsing note and why it thinks my string is two sentences - possibly because the tree is split under head-comp: delph-in.github.io/delphin-viz/demo/…
But right now this is essentially doing what I want it to - I'd need to write rules for each grammar rule I want (which is a bit time intensive, but I only need a couple hundred to start, so it shouldn't be awful). It'd be nice to be able to hook directly into ACE (I guess I could rewrite the Zhong grammar to use my plain english text instead of 'redup-olr', but that seems like a poor idea in case they update the grammar)
Basically it's just mapping at this point, I think, and this is probably the correct answer to my question. But I am open to ideas to make it more efficient if anyone has any
...better answer?
01:45
Well yeah. I am essentially duplicating code here - I am parsing with ACE, and then doing mapping and postprocessing in Python. Maybe there's some way to apply TDL rules directly or something (though I suspect that's only possible with a parser, and I don't want to rewrite a parser). Basically I think I have the best solution to my problem above, but I am open to hearing new ideas
Quite because Python does not allow direct parsing.
 
15 hours later…
16:20
And, 1 is not the only way to do it
Just on purpose
And also I don't know why 2 works
It's just statstical grammar...
for chats

  last day (18 days later) »