JonMacCall
Programmer
Hello guys,
I have a problem and I need your help. I'm a super beginner in Prolog, so all my efforts in the last few days didn't give me any result!
I have a parser (Probabilistic Context-Free Grammar) and 10 sentences. When I compile the parser, and parse each of these sentences, it gives me 2 or 3 parse trees with their probabilities. my problem is that for some of the sentences, the parse tree with highest probability is not what I expect (I have the desired parse trees and I can compare them with my result).
I want to improve the grammar (without changing the probabilities) to get correct results for all sentences. I know what the problem is. It's the relation of propositional phrases and the verb. I think I have to add some constraints to my code (i.e. when the verb is 'put' the propositional phrase should be in same level with verb and noun phrase [emphasize verb phrase], and when the verb is 'take' propositional phrase should emphasize the noun phrase). But I don't know how to do it!
Any help would be greatly appreciated.
Thanks,
Jonathan
I have a problem and I need your help. I'm a super beginner in Prolog, so all my efforts in the last few days didn't give me any result!
I have a parser (Probabilistic Context-Free Grammar) and 10 sentences. When I compile the parser, and parse each of these sentences, it gives me 2 or 3 parse trees with their probabilities. my problem is that for some of the sentences, the parse tree with highest probability is not what I expect (I have the desired parse trees and I can compare them with my result).
I want to improve the grammar (without changing the probabilities) to get correct results for all sentences. I know what the problem is. It's the relation of propositional phrases and the verb. I think I have to add some constraints to my code (i.e. when the verb is 'put' the propositional phrase should be in same level with verb and noun phrase [emphasize verb phrase], and when the verb is 'take' propositional phrase should emphasize the noun phrase). But I don't know how to do it!
Any help would be greatly appreciated.
Thanks,
Jonathan