-
-
Save crcx/7889b0d1fda5535319ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 'Confidence' var! | |
[ 'var?' ] { | |
[ 'Probability' ] :: | |
[ "s-s" dup first uppercase? [ &Probability increment ] if-true ] 'initial' : | |
[ "s-s" dup 1 fetch lowercase? [ &Probability increment ] if-true ] 'second' : | |
[ "s-s" dup lookup-function first remark? [ &Probability increment ] if-false drop ] 'no-comment?' : | |
[ "s-f" \ | |
0 !Probability \ | |
slice-length? \ | |
1 eq? [ initial no-comment? @Probability 2 eq? ] \ | |
[ initial second no-comment? @Probability 3 eq? ] if \ | |
nip \ | |
] 'var?' : | |
} | |
[ 'String' 'A' 'a' 'AppleSauce' ] :: | |
'String' var? | |
'A' var? | |
'a' var? | |
'AppleSauce' var? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment