This function calls the G2P webservice to add canonical pronunciation attributes in SAMPA (default) or IPA to a tier of tokenized orthographical words. It is usually called after tokenization with runBASwebservice_g2pForTokenization. Its output can be used as input to runBASwebservice_maus or runBASwebservice_chunker. This function requires an internet connection.
runBASwebservice_g2pForPronunciation(handle, orthoAttributeDefinitionName, language, canoAttributeDefinitionName = "KAN", params = list(embed = "maus"), patience = 0, resume = FALSE, verbose = TRUE)
name of a attribute (not level!) containing orthographic words.
language(s) to be used. If you pass a single string (e.g. "deu-DE"), this language will be used for all bundles. Alternatively, you can select the language for every bundle individually. To do so, you must pass a data frame with the columns session, bundle, language. This data frame must contain one row for every bundle in your emuDB. Up-to-date lists of the languages accepted by all webservices can be found here: https://clarin.phonetik.uni-muenchen.de/BASWebServices/services/help
attribute name for canonical pronunciations of words
named list of parameters to be passed on to the webservice. It is your own responsibility to ensure that these parameters are compatible with the webservice API (see https://clarin.phonetik.uni-muenchen.de/BASWebServices/services/help). Some options accepted by the API (e.g. output format) cannot be set when calling a webservice from within emuR, and will be overridden.
If a web service call fails, it is repeated a further n times, with n being the value of patience. Must be set to a value between 0 and 3.
If a previous call to this function has failed (and you think you have fixed the issue that caused the error), you can set resume=TRUE to recover any progress made up to that point. This will only work if your R temporary directory has not been deleted or emptied in the meantime.
Display progress bars and other information
By default, G2P is called in MAUS embed mode. This is important if you intend to use MAUS afterwards. To disable MAUS embed mode, call this function with params=list(embed="no"). To derive IPA symbols, add outsym="ipa" to the parameter list.
Other BAS webservice functions: