For Google Home, I have a pin Intent which takes 4 digit pin for a banking application.
I defined its entity type to "number sequence" but that doesn't seem to work for specific sequences. Interestingly whenever there is 2 & 1 inbetween (for eg 2212,3212, 4212.. etc) it interprets it as 2 to 1/2, 3 to 1/2 and so on.
What is the best way to define pin so as to get 2212 when I say 2212
Related
I have data on sites where invasive species have been managed, and I'm trying to merge information between two tables based on two fields.
The first table includes things like site code, species, area.
Site Code
Scientific Name
Area
001
Alliaria petiolata
Area 1
002
Clematis ternifolia
Area 2
003
Clematis ternifolia
Area 3
The second table has the "tier" or rank of importance according to experts (i.e. 1 means most important, 4 means least important, and there are some confusing letter categories as well).
scientific name
Area 1
Area 2
Area 3
Acer palmatum
2
M
M
Alliaria petiolata
4
4
4
Clematis ternifolia
4
1a
3
I'm trying to add a new column to the first table (because the actual thing has way more information) that shows the tier for that site code, based on the species and area.
Site Code
Scientific Name
Area
Tier
001
Alliaria petiolata
Area 1
4
002
Clematis ternifolia
Area 2
1a
003
Clematis ternifolia
Area 3
3
I'm not even really sure how to approach this because it's like a merge but it's contingent upon two pieces of information. I don't really want to do a giant if-else block.
Any ideas???
I am working on a software to encode postal addresses using the PostBar barcode symbology in use in Canada.
I can't find the relevant information for these codes. Wikipedia does describe PostBars, but with a caveat saying that the article is about the D12 type, whereas the Canadian Post actually uses the types D52.01/D82.01/S52.40 and S82.39, which are different and undocumented. (I also know the "CANADA POST CORPORATION 4-STATE BAR CODE HANDBOOK" document, which doesn't help.)
I need the specifics of the encoding of the fields (DCI, Postal Code, Address Locator...) and the parameters of Reed-Solomon parity bits.
I am not after an implementation, which I am able to craft myself. Thank you in advance for any tip.
This is the only thing I could find on the subject. It is not much, I'm afraid:
https://en.wikipedia.org/wiki/Canada_Post#Barcodes
Canada Post uses a 13 character barcode for their pre-printed labels. Bar codes consist of two letters, followed by eight sequence digits, and a ninth digit which is the check digit. The last two characters are the letters CA. The check digit seems to ignore the letters and only concern itself with the first 8 numeric digits. The scheme is to multiply each of those 8 digits by a different weighting factor, (8 6 4 2 3 5 9 7). Add up the total of all of these multiplications and divide by 11. The remainder after dividing by 11 gives a number from 0 to 10. Subtracting this from 11 gives a number from 1 to 11. That result is the check digit, except in the two cases where it is 10 or 11. If 10 it is then changed to a 0, and if 11 then it is changed to a 5. The check digit may be used to verify if a barcode scan is correct, or if a manual entry of the barcode is correct.
And as bonus, an explanation of the barcodes, in Dutch:
https://www.postnl.nl/Images/Brochure-KIX-code-van-PostNL_tcm10-10210.pdf
I don't think we ( Canada Post ) use PostBar anymore. Management made adoption too much of a pain for the mailer so it died. I haven't seen one on an envelope in years. Now that OCR tech is so good it wouldn't help that much to include a PostBar anyway.
What they should have done is given away software that printed up the address labels in alpha-numeric order of the postal code and printed a bunch of positional marks on the top fold of the envelope based on that same postal code. That way a postal clerk need not even take the mail out of the box to see where it should be shipped to. LVM's (large volume mailers) would do this for a rebate on their bill.
Ase for smaller businesses or the general public we should have just soled them prepaid envelopes in 2 or 3 standard sizes for a dime less than the cost of a stamp alone. A standard envelop can have a dedicated spot for a machine readable postal code. I would have gone with good old public-domain Braille! printed or in sharpy:-) Oh well I'm rambling now I'll stop.
1 It's an Emergency.
2 For one of my programming units we have to create a 'UCAS' points calculator in Net beans. UCAS sort out all of the university stuff in the UK.
3 So I need to create a GUI that has text boxes and buttons and I need to enter the amount of passes, merits, and distinctions I've got on my course, which will give me a total amount of UCAS points.
4 Passes = 70 points
5 Merit = 80 points
6 Distinctions = 90 points
7 There's 18 units in total, so if I enter I have 4 passes (a pass for 4 units) the box with the total amount of UCAS points needs to go up.
8 I need three boxes, one for passes, merits, and distinctions, and the box for the total amount of UCAS points. It needs a calculate button of course and a 'reset facility'. It says that the current date needs to be seen on the interface.
9 It also says that there should be an option to quit the program at any time.
10 It has to be a **GUI** and I literally don't know what to do and I don't want to fail again.
11 Can someone help me?
12 I literally don't know how to make the buttons work or anything.
I don't even need any help I just need someone to show me exactly what to do because I haven't got a clue.
I want to find the inter annotator agreement for few annotators.
Annotators annotates few categories (out of 10 categories) for each subjects.
For e.g. there are 3 annotator , 10 categories and 100 subjects .
I am aware about http://en.wikipedia.org/wiki/Cohen's_kappa (For two annotators) and http://en.wikipedia.org/wiki/Fleiss%27_kappa (for more than two annotators) inter annotator agreement but I realized that they may not work if user annotates more than one category for any subject.
Do anyone has any idea for determining inter annotation agreement in this scenario.
Thanks
i had to do this several years back. i cant recall how exactly i did it(i dont have code anymore) but i have a worked example to report to my professor. i was dealing with annotation of comments and have 56 categories and 4 annotators.
note:at the time i need a way to detect where annotators most disagree so that after each annotation session they can focus on why they disagree and set out reasonable rules to maximize this statistic. it worked well for that purpose
Let's assume A-D are annotators and 1-5 are categories. This is a possible scenario.
A B C D Probability of agreement
1 X X X X 4/4
2 X X X 3/4
3 X X 2/4
4 X 1/4
5
A tags this comment as 1,2,3,4 B->1,2,3, and so forth.
For each category the probability of agreement is calculated.
Which is then divided by the number of unique categories tagged for that particular comment.
Therefore for the example comment, we have 10/16 as annotator's agreement. This is a value between 0 and 1.
if this doesnt work for you then (http://www.mitpressjournals.org/doi/pdf/10.1162/coli.07-034-R2) pg-567, which was referenced by pg-587 case study.
Compute agreement on a per-label basis. If you treat one of the annotators as the gold standard, you can then compute recall and precision on label assignments. Another option is label overlap, which would be the proportion of subjects where either annotator assigned a category where the both assigned it (intersection over union).
If you ask a person to type in a page full of random hand written 20 digit numbers, I would expect that you would see different errors occur with non uniform frequency (e.g. switching 6 and 5 or 3 and 8 would be more common than 7 and 0). Are there any error correction codes that incorporate that sort of error functions into there construction?
The practical application of this is generating human enterable, error tolerant encodings for things like account numbers or cryptographic keys.