View source: R/search_openresult_inelan.R
search_openresult_inelan | R Documentation |
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')
.
search_openresult_inelan(
x,
s,
resultNr,
openOriginalEafFileIfAvailable = FALSE
)
x |
Corpus object. |
s |
Search object. |
resultNr |
Integer; Number of the search result (row in the data frame |
openOriginalEafFileIfAvailable |
Logical; if |
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.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.