search_openresult_inelan {act} | R Documentation |
Open a search result in 'ELAN'
Description
The function creates an temporary .eaf file and a .psfx file that locates the search hit.
These files will then be opened in ELAN.
To make this function work you need to have 'ELAN' installed on your computer and tell the act package where ELAN is located.
Therefore you need to set the path to the ELAN executable in the option 'act.path.elan' using options(act.path.elan='PATHTOYOURELANEXECUTABLE')
.
Usage
search_openresult_inelan(
x,
s,
resultNr,
openOriginalEafFileIfAvailable = FALSE
)
Arguments
x |
Corpus object. |
s |
Search object. |
resultNr |
Integer; Number of the search result (row in the data frame |
openOriginalEafFileIfAvailable |
Logical; if |
Details
WARNING: This function will overwrite existing .psfx files.
Credits: Thanks to Han Sloetjes for feedback on the structure of the temporary .pfsx files. He actually made the code work.
Examples
library(act)
mysearch <- act::search_new(x=examplecorpus, pattern = "yo")
# You can only use this function if you have installed ELAN on our computer.
## Not run:
options(act.path.elan='PATHTOYOURELANEXECUTABLE')
act::search_openresult_inelan(x=examplecorpus, s=mysearch, resultNr=1, TRUE)
## End(Not run)