How to connect to PCorpus in R tm package?

I am creating PCorpus, which, as I understand it, is stored on the hard drive with the following code:

pc = PCorpus(vs, readerControl = list(language = "pl"), dbControl = list(dbName = "pcorpus", dbType = "DB1")) 

How can I reconnect to this database?

0
source share
1 answer

You cannot, as far as I know. The "database" is actually a filehash file that you can reconnect and download as follows:

 db <- dbInit("pcorpus") pc<-dbLoad(db) 

but it loads each file as its own object. You must explicitly save to disk using writeCorpus and reboot with a call to PCorpus each time. The PCorpus object simply provides a way to create a Corpus object on disk, not memory.

+1
source

Source: https://habr.com/ru/post/1483456/


All Articles