To Extract ID of a document in a corpus called myCorpus
I quickly strip the leading and trailing white spaces using this command below:
meta(myCorpus[[1]],tag="ID")
I quickly strip the leading and trailing white spaces using this command below:
as.numeric(gsub("\\s$","",gsub("^\\s","",meta(myCorpus[[1]],tag="ID"))))
No comments:
Post a Comment