quadrama / DramaAnalysis

An R package for analysis of dramatic texts
GNU General Public License v3.0
15 stars 2 forks source link

Fix #169 #172

Open pagelj opened 3 years ago

pagelj commented 3 years ago

This is a fix for issue https://github.com/quadrama/DramaAnalysis/issues/169

For each segment which has no utterance or mention (depending on if mode was "Active" or "Passive") we add a dummy row with the information of the first row of the words.per.segment data table but replace the segment column with the offset of the missing segment and the count with 0. During the reshaping step, this gets propagated to all other characters/entities and prevents the segment from being omitted from the end result