getBiluoFromOrder: Get BILUO (begin-intermediate-last-unique-outside) values...

View source: R/time_seq.R

getBiluoFromOrderR Documentation

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

Description

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")
sbc007$tokenDF = changeFieldLocal(sbc007$tokenDF, "pSentBiluo", getBiluoFromOrder(pSentOrder, pSentLength))

johnwdubois/rezonateR documentation built on Nov. 19, 2024, 11:17 p.m.