Number recognition tutorial


#1

Not sure if this is the right place to record this but here goes for a noobie!
Not a developer but thought I’d try this tutorial. Yes I did read the rest of the site but not sure I really understand it! So looked at replicating this tutorial.
I had a few challenges along the way and suggest the following:

  • the curl commands didn’t work for me on Ubuntu 18.04. Specifically needed -O rather than -o and pulling down the number files was fraught! The command just didn’t work. Looked at the curl manual and ended up using: sudo curl -O https://raw.githubusercontent.com/deadletter/AK_V1/master/xxx-[0-8].png where xxx was zero through eight, i.e. 8 lines. I tried appending the 8 URL’s on a single line but curl ‘forgot’ the -O flag and just moaned about binary output and produced no files. Interestingly if I used the format -
    sudo curl -O https://raw.githubusercontent.com/deadletter/AK_V1/master/{zero,one,two,three,four,five,six,seven,eight,nine}-x.png where ‘x’ is 0-8 then curl copied the first 8 files and then errored in the same way. There is probably a better format for the command but you should update the tutorial as what is given just doesn’t work.

  • I was a little worried about substituting text and the syntax for URL’s. In particular I have stored the numbers files in a sub-directory and referenced then like this - Trusted_Cnvrstn//@/dld/numbers.txt - in the AK. Is that correct?

  • Whilst there are only a few lines in the conversation file I am trying to work out what they do. My first guess is as follows;

@Do-ID:xxx xxx can be any name I want, Do-ID is set as my name with the ‘@’ being a general substitution command and not just for FQDN?

    $* [email protected]{mjb-ak.txt}             Is $* the same as $_? It appears that the value inside {} is set as the root within [email protected]

trusted_Cnvrstn//@/dld/numbers.txt      OK but not sure what syntax may be used for URL here

[email protected]       does this just apply to dld.domain.com? In my case the files are at dld.domain.com/dld?

?bnd -- @_all                             this seems to define @ in 2 steps. Why not 1?
	@ = dld.domain.com 
		domain.com = xxxx.com    
		
?DRP -- [email protected]+Cnvrstn$   it looks to set the value of DRP but I don't follow the use of the $'s

Apologies for the long post but trying to get into machine learning and I can at least understand some of this! I’ll wait for my AK to be approved and see if I can run the tutorial.

END


#2

Hey MJB!

You seem very technical for a non developer! A good place to start is the Library explanation here; Understanding - Basic_Number_2018 (Library)

Before going over the principals here; https://deadletter.io/learn/principles/

This should help you understand what’s going on, but essentially the Conversation is comparing the substituted value of X (the input) with Y (the files from your Library). Your Author key on the otherhand is a key to identify you, your files and where to look for things.


#3

@Jacko - thanks but still struggling, About to give up when you commented.

I hadn’t seen the Principles stuff - there is no link to it that I can see.

I can’t work out the URL format to see if any output has been generated. The specification in Principles differs form that in the AK walkthrough.
I have tried:

Post.deadletter.io/Do_ID/dld.domain.com/dld/numbers.txt
(I use a sub-directory)

and

Post.deadletter.io/Do_ID=dld.domain.com=dld=numbers.txt
(as suggested in the AK walkthrough but possibly only for keys!)

as well as with a trailing /

Does this mean that there is no output or have I the URL wrong? Aside from output being generated I do not know if the conversation is working or whether there are errors - or am I missing something?


#4

Hi @mjb

deadCL uses difference techniques for outputting different types of information, if you’re looking for your Conversation output(s) these instructions will help: https://deadletter.io/learn/principles/output/

You’ll never see symbols in Conversation output address(es).

Thanks,
DS


#5

OK still lost and the use of sybols (+) in the example is unhelpful - at least to me.
NAME_YOURNAME=joebloggs
CON_FILE=dld.my.domain/file.txt

So using the link you provided is it;

https://post.deadletter.io/NAME_YOURNAME+CON_FILE
https://post.deadletter.io/joebloggsdld.my.domain=file.txt?

The second example in the link I can’t comprehend

https://post.deadletter.io/NAME_YOURNAME+YOUR-AUTHOR-KEY-NAME=CON_FILE.txt

is it in error?

Mike


#6

@mjb

Not quite sure I understand what you’re asking; but the output URL in this case would be:

https://post.deadletter.io/joebloggs+dld.my.domain=file.txt

Hopefully this helps.


#7

Thanks for clarifying. So if I look at the relevant URLs for keys and post I just get an error (404). So the key I submitted a while ago has either been overlooked or is in error.

How do I know which is the case? Is there anything wrong with this key file?

@Do-ID:joebloggs

$* [email protected]{dld.my.domain/fruitkey.txt}

trusted_Cnvrstn//@fruit.txt

[email protected]

?bnd: – @_all
@ = dld.domain.com
domain.com = my.domain

?DRP – @Do-ID+Cnvrstn$

END

Mike


#8

Hi Mike

The address you were referring to earlier was an output URL.

Your key will never be trusted on a post server - hence the error (Author Keys only appear at “https://keys.deadletter.io/@-COM/”)

For example;

If your domain is

“fifty.com”

your AK discoverable at;

“priv.fifty.com/AK.txt”

Your ‘@-COM’ address should be set as;

`“https://priv.fifty.com/AK.txt/“`

therefore the address you’d need is;

“https://keys.deadletter.io/priv.fifty.com=AK.txt”

This information is available within our Author Key Walkthrough and various docs.


#9

Thanks.
Found my key but nothing is output - so I must have a mistake somewhere!
I was trying something simple - just match a text string to that in a pre-defined set. I can then experiment once working. I’ve probably over-thought this but here is my library file:

*lib - ID-FRUIT
// copyright MJBarnard //

@;
https://dld.domain.com/

';
{!important}

";
{//POST ‘FRUIT-OB’ output}

FRUIT-OB;
Apple {apple},
Kiwi {kiwi},
Blackberry {blackberry}

/recall – Oxford University Press

END

and the conversation:

dld.keyset(‘fruitkey.txt’)
*CATCH-lib -L ID-FRUIT

*input,
@fruit.lis

FIND;
FRUIT-OB

MATCH;
INPUT, COMPARE ‘FIND’

COMPARE, input;
{POST, “FRUIT-OB” on MATCH}

END

Any thoughts on this?
The input simply contains the word ‘apple’

Mike


#10

@mjb

Could you change the file input from .lis to something else (like .html or .txt)

Thanks


#11

Done but still no output.
Is there a restriction on file extensions?


#12

Hi @mjb

Generally these two commands should be on separate lines (however that’s more a formality than a requisite when self publishing). You could try separating them as shown in our AK walk through.

Remember $* acts in place of a publisher key when self publishing.