read_clauses | R Documentation |
The function splits treaty texts into lists that reflect a structure based on having a preamble and several articles. Once articles are split, users can access the "preambles", "accession" and "termination" clauses, or "annexes" within a collection of treaty texts. The selection of each of these articles relies on regex matching certain expressions unique to each of them. Alternatively, users can get all the articles that contain a certain 'desired' word within a collection of treaty texts. As well, users can select only certain types of treaties for which specific articles are to be returned (e.g. agreements).
read_clauses(textvar, article = NULL, match = NULL, treaty_type = NULL)
textvar |
A text variable |
article |
Would you like to get a specific article? Null by default. Other options include the "preamble", the "termination" clauses, "membership" clauses, or the "annex". The specified portion for all treaties will be returned. |
match |
A regex match for a word(s) or expression. For multiple words, please use "|" to divide them. |
treaty_type |
Would you like to get certain types of treaty only? Null by default. Other treaty types include: "agreements", "protocols", "amendments", "notes", "memorandum", and "resolutions". |
Please make sure treaty texts have been standardised first
using standardise_texts()
for best results.
A list of treaty sections of the same length.
## Not run:
t <- standardise_treaty_text(sample(manyenviron::agreements$HUGGO$MainText, 30))
read_clauses(t)
read_clauses(t, article = "preamble")
read_clauses(t, article = "accession")
read_clauses(t, article = "termination")
read_clauses(t, article = "annex")
read_clauses(t, match = "constitution")
read_clauses(t, article = "preamble", match = "amend")
read_clauses(t, treaty_type = "agreements")
read_clauses(t, treaty_type = "protocols")
read_clauses(t, treaty_type = "amendments")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.