nlp_concepts_translate: NLP Concepts Translator

View source: R/nlp_translators.R

nlp_concepts_translateR Documentation

NLP Concepts Translator

Description

It will read the score code that is written as SAS Code extract the liti binary and hostame information, then write an R code equivalent in SWAT.

Usage

nlp_concepts_translate(
  in_file = NULL,
  out_file = "categoryScoreCode.R",
  zip = TRUE,
  in_caslib,
  in_castable,
  out_caslib,
  out_castable_concepts,
  out_castable_facts,
  key_column,
  document_column,
  hostname = NULL
)

Arguments

in_file

Path to zip/sas file with the score code.

out_file

Path to the translated .R code file.

zip

Boolean, if the score code is inside a zip file. Default to TRUE. It will look for dmcas_epscorecode.sas file inside the zip.

in_caslib

caslib name of the input table

in_castable

input table name

out_caslib

caslib name of the output table

out_castable_concepts

sentiment output table name

out_castable_facts

matches output table name, if the argument is not defined the table name will be the same as out_castable_concepts with "_facts" added

key_column

Key column name for unique identifier

document_column

text variable column name

hostname

NULL by default, extracts the server name from scoring code file.

Value

List object with the Rscore code, out castable, out caslib and the written file path.

Examples

nlp_category_translate("filepath.zip")


sassoftware/sas-scoring-translator-r documentation built on Dec. 7, 2023, 11:55 p.m.