importRez | R Documentation |
Import a Rez file. This returns an object containing, among other things, a nodeMap
object containing raw information, and data frames for tokens, units, chunks, track chain entries, track chains, containing only key information likely to be useful for the user.
importRez(
paths,
docnames = "",
concatFields,
layerRegex = list(),
separator = " "
)
paths |
A character vector of paths to the files to be imported. For Windows users, please use / instead of \. |
docnames |
A character vector of the document names. If left blank, a |
concatFields |
A string of names of token-level fields, for example word or transcription, that should be concatenated to form chunk- or entry-level fields. For example, if your word field is called 'word' and you have an IPA transcription field called 'ipa', then concatFields should be c("word", "ipa"). |
layerRegex |
A list, each of which is a component (just tree, track, rez, or chunk for now; stack to be added later). In each list entry, there are three components: |
separator |
The character you wish to use to separate words in concatenated columns, generally the empty string in languages like Tibetan and Chinese, and a single space in languages like Spanish and English. |
A rezrObj object. See new_rezrObj for details.
After import, you may consider calling such functions as addUnitSeq, addIsWordField or getAllTreeCorrespondences, which are excluded from the import because of performance issues.
path = system.file("extdata", "sbc007.rez", package = "rezonateR", mustWork = T)
layerRegex = list(chunk = list(field = "chunkType", regex = c("verb"), names = c("verb", "refexpr")))
concatFields = c("text", "transcript")
rez007 = importRez(path, layerRegex = layerRegex, concatFields = concatFields)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.