### Managing computationally heavy analyses/functions

Set everything up by only using around 20 rows of your data

Manage time; the most computationally heavy and time consuming functions are textHuggingFace (which is also used in textEmbed). Hence, plan your analyses, and start them over a coffe break or over night.

To better be able to plan your analyses, take time to get a better idea of how long time different analyses will takes.

library(text)
T1 <- Sys.time()
# Aggregating layer 11 and 12 by taking the mean of each dimension.
we_11_12_mean <- textLayerAggregation(word_embeddings_layers = wordembeddings_tokens_layers,
layers = 11:12,
aggregation = "mean")
T2 <- Sys.time()
T2-T1