Open FredrikKarlssonSpeech opened 3 years ago
Ok this would not be good... I spent about 100 hours rewriting almost the entire query engine to actually fix issues like this. Could you maybe send me a reprex with the output you'd expect from the query? And maybe also confirm that the old result was correct?
I fixed something in the requery which accidentally got rid of duplicate segments in certain queries. Could you maybe check if the current dev version (2.2.0.9000) fixes the issue? If so then I'll try to release a new version of emuR asap...
Sorry, I did not see your previous message but I have installed a
> requery_hier(gu,patakaC_V,level="Syllable",collapse=FALSE) -> patakaCVSylls
Warning message:
In requery_hier(gu, patakaC_V, level = "Syllable", collapse = FALSE) :
Length of requery segment list (17181) differs from input list (34296)!
> patakaCVSylls %>%
+ distinct() -> patakaSylls
> #requery_hier(gu,patakaSylls,"Task") -> patakaSyllTasks #Not needed?
> requery_hier(gu,patakaC_V,"Task") -> patakaCVSyllTasks
Warning message:
In requery_hier(gu, patakaC_V, "Task") :
Found missing items in resulting segment list! Replaced missing rows with NA values.
> requery_hier(gu,patakaC_V,level="Syllable",collapse=FALSE) -> patakaCVSylls
Warning message:
In requery_hier(gu, patakaC_V, level = "Syllable", collapse = FALSE) :
Length of requery segment list (17181) differs from input list (34296)!
> nrow(patakaCVSylls)
[1] 17181
> patakaCVSylls %>%
+ distinct() -> patakaSylls
> nrow(patakaSylls)
[1] 17181
> requery_hier(gu,patakaC_V,"Task") -> patakaCVSyllTasks
Warning message:
In requery_hier(gu, patakaC_V, "Task") :
Found missing items in resulting segment list! Replaced missing rows with NA values.
> nrow(patakaCVSyllTasks)
[1] 34296
So it seems that the issue remains. I would expect the introduced NAs as the linking is off in 4 instances, but it seems that what the requery_hier returns is a list of unique segments.
The patakaC_V contains simply C and V:s, which in pairs belong to a syllable. So predominately, patakaCVSylls should predominately contain two identical rows for each syllable. (Except for cases where this does not hold then).
So, this code:
> nrow(patakaCVSylls)
[1] 17181
> patakaCVSylls %>%
+ distinct() -> patakaSylls
> nrow(patakaSylls)
[1] 17181
should not return the same result actually. The first nrow should be 34296.
I just noticed an issue with to the 2.2.0 update and requery_heir
This is what used to happen:
Now, if I update to the 2.2.0 version of the package, I do not get the expected behavior: