Here's my model:
# For each entity E, the label probabilities should sum to 1
EntityLabel(E, +Label) = 1.
# Transfer the label outputs from Spacy to the EntityLabel predicate
2: EntityLabel_Spacy(E, Label) -> EntityLabel(E, Label) ^2
# We define a predicate DocLevelLabel expressing the distribution of labels for a given text chunk, such as "London"
DocLevelLabel(Text, Label) = 1/|E| EntityLabel(+E, Label). {E: EntityText(E, Text)}
# We add a soft constraint to increase the probability of consistent labels
1: DocLevelLabel(Text, Label) & EntityText(E, Text) -> EntityLabel(E, Label) ^2
Here's my data file:
predicates:
EntityLabel/2: open
DocLevelLabel/2: open
EntityLabel_Spacy/2: closed
EntityText/2: closed
observations:
EntityLabel_Spacy : EntityLabel_Spacy_obs.txt
EntityText : EntityText_obs.txt
targets:
EntityLabel : EntityLabel_targets.txt
With this data file, the label consistency constraint does not seem to work unfortunately. But if I also add DocLevelLabel as a target in the data file, the problem strangely disappears.
So here's my question: do all open predicates need to be explicitly specified as targets, even though we are not interested in inferring their values (as is the case for DocLevelLabel, which is just a latent variable)?
--
You received this message because you are subscribed to the Google Groups "PSL Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psl-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psl-users/1be83602-9c73-472a-8894-548e40be8e3f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.