Data Machines
...
Models Supported by Data Machi...
NLP Models
Extract Key Phrases with Filter
4min
this model compares extracts key phrases from a given text input and extracts only those phrases that match semantically to a given filter string and pass the similarity threshold also provided as an input parameter model input parameters parameter name parameter type required info input text yes the source or input string that needs to be search for information filter text yes the comparison text based on which the information needs to be filtered threshold number yes the similarity score to use as a threshold for comparison any matches found that are below this similarity score will be discarded rest api input example var settings = { "url" "https //mlapi qualetics com/api/datamachine/init?id=\<datamachine id>", "method" "post", "headers" { //add authorization headers here "content type" "application/json" }, "data" json stringify({ "input" "in summer 2024, the tcherassi brothers and namba will open the multiconcept ura, a 1,700 square foot space that includes sushi namba and the listening room, a jazz lounge that will also host cocktailante oboro ura will be located in a gated building in allapattah, an up and coming artistic neighborhood northwest of downtown miami ", "filter" "seafood", "threshold" 80 }), }; $ ajax(settings) done(function (response) { console log(response); }); model output result parameter name parameter type phrases count number detected phrases json string rest api output example the response below shows the phrases where the references similar to the filter string were used { "input" "in summer 2024, the tcherassi brothers and namba will open the multiconcept ura, a 1,700 square foot space that includes sushi namba and the listening room, a jazz lounge that will also host cocktailante oboro ura will be located in a gated building in allapattah, an up and coming artistic neighborhood northwest of downtown miami ", "original input" "in summer 2024, the tcherassi brothers and namba will open the multiconcept ura, a 1,700 square foot space that includes sushi namba and the listening room, a jazz lounge that will also host cocktailante oboro ura will be located in a gated building in allapattah, an up and coming artistic neighborhood northwest of downtown miami ", "phrases count" 1, "detected phrases" \[ { "phrase" "sushi namba", "comparison phrase" "seafood", "similarity" 0 8185465473002991 } ], "final result" \[ { "phrase" "sushi namba", "comparison phrase" "seafood", "similarity" 0 8185465473002991 } ], "sessionid" "92e7bc44 2471 4da0 a74c 49e333f22dc2", "status" "completed" } standard output parameters every model execution output consists of the following standard output parameters input the input string required for the model to extract the categories original input this is the input provided to the first step in model which is retained across multiple steps in a data machine workflow final result the result of the model executed in the final step of the data machine workflow sessionid a unique session id that is generated for every execution of a data machine which can be used to retain results across multiple sessions status the result of the data machine execution if all of the steps in a sequence are successfully executed, a value of "completed" is provided if the execution is interrupted at any point, a value of "terminated" is provided with the reason for termination