text_init: Install required Python modules in a new conda environment...

View source: R/03-dynamic.R

text_initR Documentation

Install required Python modules in a new conda environment and initialize the environment, necessary for all text_* functions designed for contextualized word embeddings.

Description

Install required Python modules in a new conda environment and initialize the environment, necessary for all text_* functions designed for contextualized word embeddings.

Usage

text_init()

Details

Users may first need to manually install Anaconda or Miniconda.

The R package text (https://www.r-text.org/) enables users access to HuggingFace Transformers models in R, through the R package reticulate as an interface to Python and the Python modules torch and transformers.

For advanced usage, see

  • text::textrpp_install()

  • text::textrpp_install_virtualenv()

  • text::textrpp_uninstall()

  • text::textrpp_initialize()

See Also

text_model_download

text_model_remove

text_to_vec

text_unmask

Examples

## Not run: 
text_init()

# You may need to specify the version of Python:
# RStudio -> Tools -> Global/Project Options
# -> Python -> Select -> Conda Environments
# -> Choose ".../textrpp_condaenv/python.exe"

## End(Not run)


psychbruce/PsychWordVec documentation built on Oct. 3, 2023, 8:55 p.m.