Entity detection details with Google DialogFlow - dialogflow-es

I implemented a bot with IBM's Watson Assistant to solve and provide solution hints to a Sudoku puzzle provided the input matrix. I'm in the process of re-implementing this with Google DialogFlow ES. For hints you can ask for the value in a cell by row and column or you can ask if a the value in a given cell is x. The bot can handle both cardinal and ordinal numbers. Because the input can come row first or column first and can be asked with the possible cell value first (is 5 the value in the first row last column) or last (is the answer to penultimate column row 5 6) I need to know where the in the input text the entity was detected in order to determine the order of the entities. The Assistant API gives me this information, but I've been unable to determine how to get this info from the DialogFlow API. Is there a way to get this?

After a pretty thorough investigation, I've concluded that Google DialogFlow will identify an entity, but will not return information regarding where the entity was found in the text response. I think this is a pretty serious limitation.

Related

How to send structured request to google sheets api?

In the official googleapi library, the get method accepts only parameters in the form of "Data! A1: D4", where Data is the name of the sheet, A1: D4 is the selection range. But how to send a request for a selection, for example by cell value or by max / min value?
I know for sure that Google has a structured query language sq, which is similar to sql. I even found examples of such requests in the 2 and 3 versions of the library.
I asked a similar question to yours a while ago, and figured out the answer. However, I believe that Google will be deprecating the sq parameter feature after first quarter of 2020. You will need to conform to method they use in API v4.
Retrieve a range of rows from Google Spreadsheet using list-based feed API and "sq" parameter

Null values for system entities

I tried an example in api.ai, with reference to the Beginner's Guide, I am attaching error response as a screen-shot. I was expecting to get the values of marked intents.
The problem is that, somehow, you have "tomorrow" associated with a city entity in the first example phrase (the purple color matches the #sys:geo-city-gb entity). Because of this, it is looking for a phrase "Can I know available slots for somewhere" where the somewhere should be a city name. But "tomorrow" is not the name of a city, so it doesn't include that.
Since neither parameter is required, but it has a pretty close match, it is able to match the intent - but none of the parameters fit, so they're all left empty.
You should be able to delete this and re-type "tomorrow" to change it back to a #sys.date entity. Or add additional phrases which match it against a date.

Excel budget w/CC input data

I am attempting to make a budget calculator and want to import my CC data to compare my actual spending w/estimated spending based on different categories. Briefly, (see attached screen shot), I have the input from my credit card which has location specific data, I have another column with a refined transaction type, and a third and final column with the associated spending category.
I can not figure out how to use the raw transaction data to search for the refined transaction type and associated spending category.
=VLOOKUP(FIND(C2&"*",Sheet3!A:A,1),A1:B10,2,TRUE)
Problem Example
First of all, the FIND function returns a number, which then becomes a parameter for VLOOKUP. This won't get you the results you're expecting. It'll search for a number.
This is going to be complex but here's a start, for EXACTLY the data you've provided.
=VLOOKUP(LEFT(C2,FIND("#",SUBSTITUTE(C2," ","#",(LEN(C2)-LEN(SUBSTITUTE(C2," ","")))/LEN(" ")))-1),A:B,2,0)
Drop that into cell D2. Have fun.

Can excel clean up free-text user entry?

any help would be massively appreciated - I'm really stuck on this.
I have a field on a user entered form that asks people what university they've attended which, due to technical limitations on our system, has to be free text.
This invariably leads to hundreds of different entries for each university, which means I have to use filter on excel and comb through thousands of entries and manually unify - lack of knowledge on how to automate this limits it's practical use massively.
Does anyone know a way we can automate this process of categorizing (and then unifying) different entries which refer to the same thing (e.g someone might put UCL, another might put "university of college, London" and another "university of college london" - I need to teach the system that all 3 are the same and then convert it on excel).
I have a list of the exact entries we want for each university, and I'm happy to manually 'teach' excel when a user entry matches one of these, providing it then learns this for the future (so as time goes on, we have to less and less manual unifying).
Happy to clarify anything, and thanks so much for any help.
Rob
Don't become the victim of user mischief.
Assign a unique ID for each valid response and have the users enter the ID.
Yup...
As you said, you need to do some teaching, here's is the teaching table. Basically just fill up as you go along. You might ask what is UOL, sorry i just crack it out, just for illustration.
And then you have the users inputs (column E), plus 5 calculated columns (F:J)
And now the formulae, I'll show those in row 2 only, the rest are just filled down.
F2 = SUBSTITUTE(E:E," ","*")
G2 = VLOOKUP(E:E,A:B,2,0)
H2 = COUNTIF(A:A,F:F)
I2 = VLOOKUP(F:F,A:B,2,0)
J2 = IFERROR(G2,IF(H2=1,I2,IF(H2=0,"Never seen before","Need validation")))
Basically the logic flow is
do the exact match vlookup of user input in teaching table, if found, then thats it and return the unified name. (Column G)
if the above exact match not found, then we'll proceed to use the star like Helper vallue. Count how many times the HELPER value is found in the teaching table. (Column H)
do the exact match vlookup of helper value in teaching table. (Column I, for use with Column H)
If value in column G is not an error, then use it,
else if value in Column H is 1, then VLOOKUP(HELPER) value is good. If its 0, then you haven't teach excel on the name before. If >2, then it means it need your further attention, the VLOOKUP(Helper) value could be wrong as there are more than one matches.
The trick here is the HELPER column. by replacing blank space with stars, the vlookup now become some sort like vlookup of a sequence of keywords. Doesn't matter how the user's input is, as long as some keywords found and the sequence match, the countif and vlookup return the value.
And at the same time, you also submit an IT enhancement request ! :)

Excel: Search for keywords within a matrix to build a relation in another

First of all, thanks for all who read through - It's not easy to explain it with words, as iam not allowed to post pictures yet.
Here we go:
Imagine 2 sheets within an excel document.
Sheet1: The Matrix
In Column A you'll find a 'description text' for a specific problem
Column B (and the following) are filled with several information to the problem, but we don't need them for my current problem.
Sheet2: Relation
I've got another table with Error-Description and IDs. Unfortunetaly those who write the description text don't use the same sentences as I do for my error-description. But i need to get a relation, to further analyze the problem.
To do so, i created another sheet with 'keywords' and the ID of the error.
Trying several things iam not able to....: (Now the problem starts for all tldr;)
HOW do I build up the relation. Keywords are set as
"*test*" "*whaterrorcustomer*" and so on.
While the description text is more like
"We had a test here but it failed" and so on..
I want to add a column in the first sheet (sheet1: Matrix) with the ID.
So I need to search within the description text for the keywords and return the ID.
Any idea how I could do this?
Edit:
Here an picture (just got my rep. points) :
I want the Text beeing related to the ID by looking for the keywords.
Iam very thankful for ANY help
For those who face the same problem, got it solved.
=lookup(2;1/SEARCH(Relation!A$2:A$5;Sheet1!A2);Relation!B:B)

Resources