quadrama / DramaAnalysis

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

segment = "xxx" for figurestatistics() #85

Closed BenjaminKrautter closed 6 years ago

BenjaminKrautter commented 6 years ago

Funktion um figurestatistics() nach Akten oder Szenen zu segmentieren fehlt bisher. Siehe dictionarystatistics()

nilsreiter commented 6 years ago

figureStatistics(rksp.0$mtext, segment = "Scene") now generates this table:

    corpus  drama Act Scene length                b tokens types utterances utteranceLengthMean utteranceLengthSd
 1:   test rksp.0   I     1  25365        der_prinz    340   175          6           56.666667        44.8850383
 2:   test rksp.0   I     1  25365 der_kammerdiener     39    32          5            7.800000         5.4037024
 3:   test rksp.0   I     2  25365        der_prinz     94    65          6           15.666667         8.2865353
 4:   test rksp.0   I     2  25365            conti    101    76          6           16.833333        11.8560814
 5:   test rksp.0   I     3  25365        der_prinz    148    82          1          148.000000                NA
 6:   test rksp.0   I     4  25365            conti    663   286         18           36.833333        45.0871705
 7:   test rksp.0   I     4  25365        der_prinz    815   341         18           45.277778        37.4351291
...