Get sequence number (position) within a larger structure (turn, prosodic sentence, etc.) from the ID of that structure, or the other way around
orderseq.Rd
Get sequence number (position) within a larger structure (turn, prosodic sentence, etc.) from the ID of that structure, or the other way around
Arguments
- id
The ID of the larger structure within which you would like to find the position of an individual component. For example, if you want to find the position of a word within a prosodic sentence from the prosodic sentence ID.
- isWord
Vector of logical values indicating whether something is to be counted as word.
- order
The position of an individual component within a larger structure.
Value
A vector of sequence values within that structure. For example, if you are working with the tokenDF and id
gives the prosodic sentence ID, then this function will return the position of a token within a prosodic sentence.
A vector of either order values within the structure . For example, if you are working with the tokenDF
and id
gives the prosodic sentence ID, then getOrderFormSeq
will return the position of a token within a prosodic sentence. If order
gives the position within the prosodic sentence, then getSeqFromOrder
will return the prosodic sentence sequence.
Examples
sbc007$tokenDF = addFieldLocal(sbc007$tokenDF, "tokenOrder2", getOrderFromSeq(unitSeq))
#> Error in .f(df, ...): ℹ In argument: `tokenOrder2 = getOrderFromSeq(unitSeq)`.
#> Caused by error in `unique()`:
#> ! object 'unitSeq' not found
sbc007$tokenDF = addFieldLocal(sbc007$tokenDF, "pSent", getSeqFromOrder(pSentOrder))