Skip to contents

Get BILUO (begin-intermediate-last-unique-outside) values from a sequence value.

Usage

getBiluoFromOrder(seq, length)

Arguments

seq

The sequence number of the entity within a larger structure. For example, tokenOrder for the position of a token within a unit.

length

The length of the sequence, which you can get from inLength()

Value

A vector of BILUO values corresponding to the sequence values. B = beginning of the larger structure, L = last element of the larger structure, I = intermediate element of the larger structure, U = only element of the larger structure, O = not within the larger structure.

Examples

sbc007$tokenDF = addFieldLocal(sbc007$tokenDF, "pSentLength", inLength(pSentOrder, isWord = (text != "<0>")), type = "complex", groupField = "pSent")
#> Error in group_by(df, ...): Must group by variables found in `.data`.
#>  Column `pSent` is not found.
sbc007$tokenDF = changeFieldLocal(sbc007$tokenDF, "pSentBiluo", getBiluoFromOrder(pSentOrder, pSentLength))
#> Error in .f(df, ...): Problem while computing `pSentBiluo = getBiluoFromOrder(pSentOrder,
#> pSentLength)`.
#> Caused by error in `isFinal()`:
#> ! object 'pSentLength' not found