Prepare html document to see full text.
html(object, ...) # S4 method for character html(object, corpus, height = NULL) # S4 method for partition html( object, meta = NULL, cpos = TRUE, verbose = FALSE, cutoff = NULL, charoffset = FALSE, beautify = TRUE, height = NULL, ... ) # S4 method for subcorpus html( object, meta = NULL, cpos = TRUE, verbose = FALSE, cutoff = NULL, charoffset = FALSE, beautify = FALSE, height = NULL, ... ) # S4 method for partition_bundle html( object, charoffset = FALSE, beautify = TRUE, height = NULL, progress = TRUE, ... ) # S4 method for kwic html(object, i, s_attribute = NULL, type = NULL, verbose = FALSE, ...)
object | The object the fulltext output will be based on. |
---|---|
... | Further parameters that are passed into |
corpus | The ID of the corpus, a length-one |
height | A |
meta | Metadata to include in output, if |
cpos | Length-one |
verbose | Length-one |
cutoff | An |
charoffset | Length-one |
beautify | Length-one |
progress | Length-one |
i | An |
s_attribute | Structural attributes that will be used to define the partition where the match occurred. |
type | The partition type. |
Returns an object of class html
as used in the htmltools
package. Methods
such as htmltools::html_print
will be available. The encoding of the html
document will be UTF-8 on all systems (including Windows).
If param charoffset
is TRUE
, character offset positions will be
added to tags that embrace tokens. This may be useful, if exported html document
is annotated with a tool that stores annotations with character offset positions.
#>#>#>#>H <- html(P) if (interactive()) H # show full text in viewer pane # html-method can be used in a pipe H <- partition("REUTERS", places = "argentina") %>% html()#>#># use html-method to get full text where concordance occurrs K <- kwic("REUTERS", query = "barrels") H <- html(K, i = 1, s_attribute = "id")#>#>H <- html(K, i = 2, s_attribute = "id")#>#>for (i in 1L:length(K)) { H <- html(K, i = i, s_attribute = "id") if (interactive()){ show(H) userinput <- readline("press 'q' to quit or any other key to continue") if (userinput == "q") break } }#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>