Detecting Ordinal plurals - dialogflow-es

How can I detect ordinal plurals in DialogFlow?
I know there is the sys.ordinal entity. But that will only detect.
Third Fourth
But I want to detect
Thirds Fourths

Enter (be sure to actually press enter) your training phrase with an ordinal plural, for example, "I would like to cut the pie in fourths." Then highlight the word fourths and a dialogue box should pop up. Find #sys.ordinal:ordinal and click it. Do that with a couple of other plural ordinals for good measure and then it will recognize them all.
Note that sometimes the dialogue box fails to pop up when you highlight a word. If this happens just try highlighting it a couple more times. Usually it will work eventually.

Related

Barcode scanner input into excel

is there a way i could create a simple program/code that allows me to have excel automatically create cell gaps between barcode scanned text the information should be presented as:
Sample number 1
Sample number 1
Gap
Gap
Sample number 2
Sample number 2
I use a barcode scanner (datalogics gryphon) to scan blood samples and work and constantly need to press enter in order to manually create gaps between the blood samples i scan. Is there any way i could have this done automatically. The normal gist is usually "scan, enter, scan, enter, enter, enter, scan" I want to remove the need of pressing enter between scanning. I need to scan countless blood samples on a day-to-day basis and this will increase speed by a dramatic amount
A bar code reader sends character to an application in the similar way a keyboard way does.
A simple way would be to print on a blank sheet the bar code for "Enter". The enter command is "CR" and the value in hexadecimal is "0D".
Scanning the "CR" code between each sample doesn't remove a step but avoids going to the keyboard.

Excel order writing Arabic text and English Numbers

Problem:
I have a sentence/word I need to past in an excel cell. It consists of an Arabic word, along with some numerical values (in English). For example, let's say I want to write the below
However, excel keeps returning the below
2,1 - الحدث
It you notice, the numerical values are always moved to the left of the word, while I want to keep it on the right.
I tried concatenating, but didn't seem to help. I am open to any solution, vba or not, as I have spent a lot of time on this with no luck.
I added this keyboard to my device and it helped me with that.
Central Kurdish Keyboard
Use it to write the numbers only, and use the normal arabic keyboard to write the rest of the text.
And note that it didn't work with the numpad, it worked only with the numbers row at the top - the one that has the special characters !##$%^&*()

Looking for suggestions on data filtering options in Excel via VBA

I have a project where I want to filter down a lot of data based on user's selections of 8 different criteria. In my case it's kitchen cabinets but a more universal example would be cars. The user is presented with a userform containing 8 listboxes, one for Make, Model, Package, Color, Transmission and so on. Double-clicking on a listbox item removes all other choices in that listbox and filters out invalid choices from all the other listboxes. The choices compound so the user could choose "Green" for Color and "Ford" for Make.
I've done this two different ways already and I'm not happy with either.
1) I created a matrix where I listed Models down the left hand side and each of the other 7 features across the top with "X" at the intersect points. Then I taught VBA how to basically read it like a human would using a ton of nested loops. This was pretty slow, where each selection caused the program to halt for 1-2 minutes while it sorted everything out.
2) I listed out every single possible combination (some 22,000) and used Excel's built in filtering options to filter the data, then copy each column of the results onto a second sheet, filtering out duplicates and re-sorting them, and using that to re-populate the listboxes. This worked really well but for some reason I can't fathom, Excel gets hung up for 3-10 minutes doing something when I filter certain columns. I debug/traced it and the hang up happens after all my code is run, but before it returns control to the user.
At this point I'm open to any suggestions. Ultimately I need the user to choose one complete (all 8 options narrowed down to one choice) configuration. The tricky part is the user may start with color "Green" which would eliminate all other colors from the "Color" choices list, as well as any Make, or Model, or Package, etc that doesn't come in Green from their respective lists. Maybe data would help explain it?
Make Model Package Color Transmission
Ford Focus LT Blue Manual
Ford Focus LT Green Manual
...
Ford Focus ST Blue Manual
...
Ford Focus LT Blue Automatic
...
And so on for 22,000 rows.
So if the user chooses "Manual" I need to drop the "Automatic" rows. If the user then chooses "ST" I need to drop the "LT" rows (while assuming the Automatic rows are still being filtered out, and so on until there's only one row left.
Just an idea that came to mind: Are you familiar with a highly efficient method of searching for words in a dictionary of words called Trie?
If you code each option properly you could enter the whole option map in a Trie. When a user makes a selection you follow that path in the Trie. If no matching option exist then the Trie returns Null and you can inform the user about that.
Good explanation of a practical Trie implementation for words:
https://www.geeksforgeeks.org/trie-insert-and-search/

Search formula for best text match among two excel lists

I have a long list of products (+20,000 items) of surgical instruments. Sometimes I receive requests for different names of these products which is impossible to manually match in my list.
I was thinking of a formula to find or suggest the closest result of match for the common words in each cell.
I have created this formula:
=INDEX('Products'!G:G,MATCH((("*"&LEFT(A2,5),'Products'!G:G,0))
(where Products G:G refers to my long list.
it gave some results correctly but more than 80% of the result came back with false results.
please see the attached image to show you the result.
is there is a way I can get more accurate result?
or I was thinking of finding major category of each item such as:
Category 1: Scissors, Retractors, Knives, etc.
Category 2: Straight, Curved, Angeled, etc.
Category 3: Sharp, Blunt, etc.
Category 4: 10mm, 130mm, 24cm, etc. (size)
which is easy for me to do it.
then use the same formula but with referring to the common words..
something like:
=INDEX(Products!G:G,MATCH("*"&LEFT(E2,5)&"*"&F2&"*"&G2&"*",Products!G:G,0))
where E2, F2, G2 refers to the categories..
I tried but it gave false results as well.
I urge you in the strongest sense of the word to spend some time creating a good quality master table and then spinning off 1 table for each category.
make use of clean(), trim(), proper(), heck, if you need to copy the data in notepad++ and enable view all symbols then switch between ansi utf utf8 wtf omgwtf or any other encoding to ensure you dont have any hidden special characters than do it.
you have 4 categories, so that's 4 1 column tables. name them. no duplicates. no trash. no junk. sort your data. nice clean names/words/whatever you categorize by. if you absolutely must add an index or key column then go ahead but do yourself a favor and stop there. use a different table to deepen your relationships.
next step is to to create comboboxes. i'm not sure why but the combobox in excel is not the same combobox in the vba editor. you want the one in the editor. you can make a fancy user form or you can make a minimalist text box design. whatever you fancy. just make sure the combobox has a field for RowSource in the properties. for whatever reason i don't get that option if i am not in the vba editor when i create the box.
you're almost gauratneed to want drawmodal = false on every user form you make for these boxes
you probably really don't need more than 4 boxes but it depends what you're doing so that's up to you. name your combo boxes.
verify each box has: matchentry = 1-fmMatchEntryComplete
i recommend: style = 0 - fmStyleDropDownCombo
this will allow you to begin typing and autocomplete the first match and also let you select from a drop down list, starting with the the first match of the name you've typed.
you can set the number of elements in the list. default is 8. if you have a slow computer than i wouldn't push it much. if you have a best then give it a shot.
you can also change fonts for easier reading and a bunch of other format changes.
now the this is the most important part - RowSource will be one of those 4 tables
now that i've given instructions, let me explain why. some businesses don't have the best practices and i'm currently with one that's using an oracle erp solution for data management but the front end isn't used. data entry is done in excel and loaded into oracle using batches. lookups in oracle continue to be a psychological barrier for the ap/ar teams so i did exactly what i suggested here but took it a few steps farther.
i pulled the vendor master and i pulled teh customer master
i cleaned the data and compiles simple pure clean 1 column tables
then i created a form for the comboboxes
first came ap with vendor name
then vendor number
then vendor remittance location
our orderering facility number
selecting a vendor name populates the vendor number box with the possible vendor numbers. same for remittance location and ordering facility
i pulled a year's worth of transaction data and created a gl table. some vendors have only ever used 1 gl acount. some several. there's a % number next to each gl. that represents the value of transactions posted from that vendor to that gl for the last year.
next up a date picker and text boxes for invoice fields.
get it nice and tight on a form, set the tab stops, add a commit button and all of a sudden we have a front end excel platform that performs better than oracle - because people use
i haven't finished the ar side but it'll get done and i'll the angels will be rejoicing and singing my name for years to come.
1:1 matching with autofill and drop down functionality you can't beat it. that's what you get with my suggestion.
best of luck!

Search function to send all variations of the text uppercase an lowercase

I have a function that uses an api to pull information based on the text given in the request.
The problem is that the text has to match the item exactly. Such as the item is named "Peach and Apple" and if you type "peach and apple" it will not return. You have to type "Peach and Apple" in order to properly request the item.
Is there a way I can send every variation of "Peach and Apple" (just incase is was something weird like "Peach and Le'Apple") with every variation of an uppercase letter?
I could make it uppercase every letter at the start of the string which is easy and would work with a lot of requests. Then I could uppercase every letter after a space which with the previous change would handle ALMOST every search.
The problem is I cannot make it uppercase every letter after a ' for this example(reason):
"Peach and Le'Apple" would work but "Peach and Apple's Leaf" would not work since the s is not uppercase. Thus is there a way to properly search for this?
Thanks for your time!!!
So I figured a way around it. The problem was that the items I was searching for had to be in the exact form. I was the one that saved those items from the api. So when I save them now I have 2 separate columns. One that saves the name with uppercase that will be what is shown on screen and another that saves the same name only purely converted to lowercase with toLowerCase(). This lets me search for the items and still keep the nice uppercase name without having to do some nasty logic I dont want to do.

Resources