udpipe_load_model: Load an UDPipe model

Description Usage Arguments Value References See Also Examples

View source: R/udpipe_models.R

Description

Load an UDPipe model so that it can be use in udpipe_annotate

Usage

1

Arguments

file

full path to the model or the value returned by a call to udpipe_download_model

Value

An object of class udpipe_model which is a list with 2 elements

References

https://ufal.mff.cuni.cz/udpipe

See Also

udpipe_annotate, udpipe_download_model, udpipe_train

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Not run: 
x <- udpipe_download_model(language = "dutch-lassysmall")
x$file_model
ud_english <- udpipe_load_model(x$file_model)

x <- udpipe_download_model(language = "english")
x$file_model
ud_english <- udpipe_load_model(x$file_model)

x <- udpipe_download_model(language = "hebrew")
x$file_model
ud_hebrew <- udpipe_load_model(x$file_model)

## End(Not run)


x <- udpipe_download_model(language = "dutch-lassysmall", model_dir = tempdir())
x$file_model
if(!x$download_failed){
  ud_dutch <- udpipe_load_model(x$file_model)
}

## cleanup for CRAN
if(file.exists(x$file_model)) file.remove(x$file_model)

udpipe documentation built on June 1, 2021, 5:10 p.m.