Create text documents from CoNLL-style files.
a connection object or a character string.
encoding to be assumed for input strings.
a character vector specifying the format. See Details.
a named or empty list of document metadata tag-value pairs.
CoNLL-style files use an extended tabular format where empty lines separate sentences, and non-empty lines consist of whitespace separated columns giving the word tokens and annotations for these. Such formats were popularized through their use for the shared tasks of CoNLL (Conference on Natural Language Learning), the yearly meeting of the Special Interest Group on Natural Language Learning of the Association for Computational Linguistics (see https://www.signll.org/conll/ for more information about CoNLL).
The precise format can vary according to corpus, and must be specified
format, as either a character string giving a
pre-defined format, or otherwise a character vector with elements
giving the names of the ‘fields’ (columns), and names used to
give the field ‘types’, with ‘WORD’, ‘POS’ and
‘CHUNK’ to be used for, respectively, word tokens, POS tags, and
chunk tags. For example,
c(WORD = "WORD", POS = "POS", CHUNK = "CHUNK")
would be a format specification appropriate for the CoNLL-2000
chunking task, as also available as the pre-defined
which serves as default format for reasons of back-compatibility.
Other pre-defined formats are
"conll01" (for the CoNLL-2001
clause identification task),
"conll02" (for the CoNLL-2002
language-independent named entity recognition task),
(for the CoNLL-X format used in at least the CoNLL-2006 and CoNLL-2007
multilingual dependency parsing tasks), and
"conll09" (for the
CoNLL-2009 shared task on syntactic and semantic dependencies in
The lines are read from the given connection and split into fields
scan(). From this, a suitable representation of
the provided information is obtained, and returned as a CoNLL text
document object inheriting from classes
There are methods for class
"CoNLLTextDocument" and generics
(as well as
which should be used to access the text in such text document
The methods for generics
provide a mechanism for mapping POS tags via the
see section Details in the help page for
tagged_words() for more information.
The POS tagset used will be inferred from the
metadata element of the CoNLL-style text document.
An object inheriting from
TextDocument for basic information on the text document
infrastructure employed by package NLP.
https://www.clips.uantwerpen.be/conll2000/chunking/ for the
CoNLL-2000 chunking task, and training and test data sets which can be
read in using
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.