gloss_data {glossr} | R Documentation |
gloss_data
class
Description
Based on a character vectors and up to three label arguments, create an object where those arguments are attributes. These are:
-
source: Where the text comes from. This will be printed in the first line of the example, without word alignment.
-
translation: Free translation. This will be printed as the last line of the example, without word alignment and in quotation marks if so desired.
-
label: Named label of the example, for cross-references.
-
lengths: This is computed within the function, not provider, and it's the number of items identified in each gloss line.
Usage
new_gloss_data(
gloss_lines,
source = NULL,
translation = NULL,
label = NULL,
trans_quotes = config$trans_quotes
)
Arguments
gloss_lines |
Lines for glossing, as a list |
source |
(Optional) Source of example |
translation |
(Optional) Free translation |
label |
(Optional) Example label |
trans_quotes |
(Optional) Quotes to surround the free translation with. |
Details
This function is mostly for internal use, but may be useful for debugging or
checking the output of specific calls. Normally, it's best to use
as_gloss()
or gloss_df()
.
Note that, unlike as_gloss()
, new_gloss_data
requires a list
of gloss lines.
Value
Object of class gloss_data