FMAT_query | R Documentation |
Prepare a data.table of queries and variables for the FMAT.
FMAT_query(
query = "Text with [MASK], optionally with {TARGET} and/or {ATTRIB}.",
MASK = .(),
TARGET = .(),
ATTRIB = .()
)
query |
Query text (should be a character string/vector
with at least one |
MASK |
A named list of For model vocabulary, see, e.g., https://huggingface.co/bert-base-uncased/raw/main/vocab.txt Infrequent words may be not included in a model's vocabulary,
and in this case you may insert the words into the context by
specifying either |
TARGET , ATTRIB |
A named list of Target/Attribute words or phrases.
If specified, then |
A data.table of queries and variables.
FMAT_load
FMAT_query_bind
FMAT_run
FMAT_query("[MASK] is a nurse.", MASK = .(Male="He", Female="She"))
FMAT_query(
c("[MASK] is {TARGET}.", "[MASK] works as {TARGET}."),
MASK = .(Male="He", Female="She"),
TARGET = .(Occupation=c("a doctor", "a nurse", "an artist"))
)
FMAT_query(
"The [MASK] {ATTRIB}.",
MASK = .(Male=c("man", "boy"),
Female=c("woman", "girl")),
ATTRIB = .(Masc=c("is masculine", "has a masculine personality"),
Femi=c("is feminine", "has a feminine personality"))
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.