bnosac / udpipe

R package for Tokenization, Parts of Speech Tagging, Lemmatization and Dependency Parsing Based on the UDPipe Natural Language Processing Toolkit
https://bnosac.github.io/udpipe/en
Mozilla Public License 2.0
209 stars 33 forks source link

udpipe_download_model overwrite=TRUE ? #30

Closed mingodad closed 5 years ago

mingodad commented 5 years ago

Hello ! It seems to me that the default for the overwrite parameter should be FALSE, this way the model will only be downloaded if not already there.

  if(overwrite || !file.exists(to)){
    message(sprintf("Downloading udpipe model from %s to %s", url, to))
    utils::download.file(url = url, destfile = to, mode = "wb")  
  }

Cheers !

jwijffels commented 5 years ago

Appreciate the comment but it really is intentionally put to TRUE in order to make sure that if someone has a file only partially downloaded, it still will overwrite it. The argument is set to TRUE when you use directly the udpipe function. I would like to keep it this way in order to make sure everyone understands that it is downloading the file from the internet.