def getModelWithAbbrQRAndSpeller_smdata_smmodel(): nlp = model_sm.load() return CliNlpModel("smdata_smmodel_abbrqr_speller", getIntentSet_sm(), nlp, rewriteDataQuery=rewriteAbbrInQuery, rewriteUserQuery=combineQueryRewriters( [rewriteAbbrInQuery, correctSpellingErrors]))
def getModelWithAbbrQRAndSpeller(): nlp = model_lg.load() return CliNlpModel("lgd_lgm_abbrqr_speller", getAllAsQueries, data.cliData, nlp, rewriteDataQuery=rewriteAbbrInQuery, rewriteUserQuery=lambda q: correctSpellingErrors( rewriteAbbrInQuery(q)))
def getModelWithAzureResourceRecognizer(): nlp = model_lg.load() intentSet = getIntentSet() azureResourceRecognizer = AzureResourceRecognizer(nlp) nlp.add_pipe(azureResourceRecognizer, last=True) return CliNlpModel("lgd_lgm_azRecognizer", intentSet, nlp, rewriteAbbrInQuery, preProcessDoc=updateDocVector)
def getModelWithAbbrQrStopsQrAndSpeller(): nlp = model_lg.load() intentSet = getIntentSet() return CliNlpModel("lgd_lgm_abbrQrStopsQrAndSpeller", intentSet, nlp, rewriteDataQuery=combineQueryRewriters( [rewriteAbbrInQuery, rewriteStopWords]), rewriteUserQuery=combineQueryRewriters([ rewriteAbbrInQuery, rewriteStopWords, correctSpellingErrors ]))
def getModelWithAbbrQR(): nlp = model_lg.load() return CliNlpModel("lgd_lgm_abbrqr", getAllAsQueries, data.cliData, nlp, rewriteAbbrInQuery)
def getBaselineModel_partial(): nlp = model_lg.load() return CliNlpModel("pad_lgm", getAllAsQueries, data.cliData_partial, nlp)
def getBaselineModel_sm(): nlp = model_sm.load() return CliNlpModel("smd_smm", getAllAsQueries, data.cliData_sm, nlp)
def getBaselineModel_idonly(): nlp = model_lg.load() return CliNlpModel("lgd_lgm_idonly", getIdAsQuery, data.cliData, nlp)
def getModelWithAzureResourceRecognizer(): nlp = model_lg.load() azureResourceRecognizer = AzureResourceRecognizer(nlp) nlp.add_pipe(azureResourceRecognizer, last=True) return CliNlpModel("lgd_lgm_azRecognizer", getAllAsQueries, data.cliData, nlp, rewriteAbbrInQuery, updateDocVector)
def getModelWithAbbrQR(): nlp = model_lg.load() return CliNlpModel("lgd_lgm_abbrqr", getIntentSet(), nlp, rewriteAbbrInQuery)
def getModelWithAbbrQrVectorAssigned(): nlp = model_lg.load() # nlp = addAbbrVector(nlp) return CliNlpModel("lgd_lgm_abbrqr", getAllAsQuries, data.cliData, nlp, rewriteQuery)
def getModelWithAbbrVectorAssigned_partial(): nlp = model_lg.load() nlp = addAbbrVector(nlp) return CliNlpModel("lgd_lgm_abbr", getAllAsQuries, data.cliData_partial, nlp)
def getBaselineModel(): nlp = model_lg.load() return CliNlpModel("lgd_lgm", getAllAsQuries, data.cliData, nlp)