-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
as_conll2002 <- function(x, sep = "\t"){
## Each word has been put on a separate line and there is an empty line after each sentence.
id <- udpipe::unique_identifier(x, fields = intersect(c("doc_id", "paragraph_id", "sentence_id"), colnames(x)))
add <- ifelse(!duplicated(id), "\n\n", "\n")
add[1] <- ""
word <- x$token
entity <- x$chunk_entity
sprintf("%s%s%s%s", add, word, sep, entity)
}
cat(as_conll2002(head(x, 100)))
to be used in training based on bertje
Metadata
Metadata
Assignees
Labels
No labels