Hi all!
To help computers understanding natural language, we can make the structure of the sentence explicit (see wikipedia subordination (https://en.wikipedia.org/wiki/Subordination_%28linguistics%29)).
A > B A is subordinate of B
A < B B is subordinate of A
A < [ B | C ] B and C are subordinate of A
A {B} C A and C are conjuncts, B is coordinator
A {} B A and B are conjuncts
I < need < ( [ your > clothes | your > boots ] {and} ( your > motorcycle ) )
( if < you < have < ( a > moment ) ) > ( I < would < love < ( your > thoughts ) < on < this )
( are < [ there | ( any > rules ) < [ I < should < know | about ] ] ?
computers < are < ( ( very > good ) < at < ( ( following < ( exact > orders ) ) {and} ( handling < ( ( very > specific ) > things ) ) ) {but} ( ( not > good ) < at < ( dealing < with < ( ( new > things ) < they < haven't seen < before ) ) ) )
( for example ) < ( ( [ a | common | computer ] > program < can < turn < [ ( a > report ) < of < ( names {and} ( hours < worked ) ) | into < paychecks < for ( the > workers < at < ( a > company ) ) ] ) {but} ( [ the | same ] > program < could not < answer < questions < [ from ( an > employee ) | about < why < ( the > company ) < will not < pay < for < ( nap time ) ] ) )
To make it even less ambiguous, we can add a number after the word to indicate the meaning. For example, door4 (https://en.wiktionary.org/wiki/door)is "a non-physical entry into the next world, a particular feeling, a company, etc."
EDIT: typos
EDIT: new examples. Questions seems hard to structure...
More examples...
Layout:
( clear < the page )
( draw < a table < [
center it on the page |
it has 4 columns < [
head color < cyan |
1 < [ title < name | width < 120px ] |
2 < [ title < age | width < 40px ] |
3 < [ title < city | width < 180px ] |
4 < [ title < occupation | width < 240px ]
] |
it has 10 rows < [
height < 20 |
head color < orange
]
] )
Logic:
(A < is grandfather of < C)
< means that <
( (A < is father of < B) {and} (B < is father of < C) )
( A < is ancestor of < C )
< means that <
( (A < is father of < C) {or}
( (A < is father of < B) {and} (B < is ancestor of < C) ) )
EDIT: Deleted bad precedence rule
Finally, it's a kind of directed graph and s-expressions mix
# name: section definition
"name" reference to section or file#section
* wildcard
> of
< whose
| parallel
/ forward
\ backward
{ } custom coordinator
[ ] relation distribution
( ) group as a whole
A > B A is sub-element of B
A < B B is sub-element of A
A < [ B | C ] B and C are sub-elements of A
A < [ B / C ] same + C comes after B
A < [ B \ C ] same + C comes before B
A {B} C A and C are co-elements, B is coordinator
A {} B A and B are co-elements
EDIT: Added sections def and ref. This thing has a name now: DSX syntax. Names with an X are cool ::)
Relatively speaking...of course! ;D
;D Sure, it had to be said!
So I'm still working on this, here are the first two sections of my vintage page:
String type is the king of data types. It is both an absolute low-level, since it can be entered directly on the keyboard, and the highest-level since it's where you would store a poem about God.
In a speech, there's an implicit network of links between words and expressions, which organize them by coordination and subordination. Humans can easily rebuild these invisible links, thanks to their common sense, and understand what is said. But for a computer, it's a tough task. Computers need formal languages, where everything is explicit, because they don't have background knowledge to fill the holes. We can use a special syntax to describe explicitly these links. When parsed, a text written in this syntax won't be stored in a single string, but in a meaningful structure of strings linked to one another.
Understanding natural language is hard also because one word often has several meanings. Humans use logic and the context to deduce what is meant. Again, this requires a rich knowledge computers don't have. In our syntax, we make meanings explicit by adding a number at the end of each word. This number indicates which meaning, in the Wiktionary, we're refering to. For example, door4 is "a non-physical entry into the next world, a particular feeling, a company, etc."
Another complex challenge for computers is coreference resolution, the ability to determine which expressions refer to the same entities. We make these coreferences explicit by adding a simple identity tag right after the expressions, when needed. If two expressions have the same identity tag, they refer to the same entity.
Finally, to help computers with named entity recognition, we also use a proper name tag, that is placed right before an expression to indicate that this expression is the name of an entity.
Here is a table showing special characters used in DSX syntax:
# name = filename; : shortcut for long filenames
# name: : section definition
:
"name" : reference to section or file#section
:
@ : indentity tag
^ : proper name tag
:
> : of
< : whose
:
| : parallel
/ : forward
\ : backward
:
= = : custom coordinator
[ ] : relation distribution
( ) : group as a whole
:
A > B : A is sub-element of B
A < B : B is sub-element of A
A < [ B | C ] : B and C are sub-elements of A
A < [ B / C ] : same + C comes after B
A < [ B \ C ] : same + C comes before B
A =B= C : A and C are co-elements, B is coordinator
A == B : A and B are co-elements
Hope this can give ideas to someone :)
I understand, so you can have the raw power of ASM and the flexibility of metafigures...
Here are the updated examples:
computers < are <
(
(
(very > good) < at <
(
( following < (exact > orders) )
=and=
( handling < ((very > specific) > things) )
)
)
=but=
(
(not > good) < at <
(
dealing < with <
(
(new > things) < they < haven't seen < before
)
)
)
)
( for example ) <
(
(
( [ a | common | computer ] > program ) < can <
(
turn <
[
a > report < of < ( names =and= (hours < worked) )
|
into < paychecks < for <
(
the > workers < at < (a > company)
)
]
)
)
=but=
(
( [ the | same ] > program ) < could not <
(
answer < questions <
[
from < (an > employee)
|
about < why <
(
(the > company) < will not < pay < for < (nap time)
)
]
)
)
)
EDIT: typos