You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Claude Shannon saw the world in 1s and 0s, Realizing they could represent words, sounds, images, even ideas.
Harper doesn't interpret "1s" and "0s" as nouns. It seems "1" and "0" as numbers despite their suffixes. It sees "s" and "and" as adjacent words.
We could add a lexer for suffixed numbers or just suffixed single digits that returns word type.
We'd have to take into account at least:
the -s suffix on numbers can have other meanings, such as "seconds".
people often use a -'s suffix for plurals for things like single letters, digits, acronyms, etc.
Actually can we add numbers to the curated dictionary? Wouldn't make sense for most numbers or even the other single digits. I'll check this... OK it makes no difference. No tests fail but behaviour doesn't change. I think this is due to the lexical analysis having higher priority than the dictionary lookup? The numbers get lexed as numbers rather than words so there is no chance for 1s and 0s to be looked up in the dictionary.
Resources
If the problem is not obvious, some online resources clarifying the relevant grammar point can be useful.
Screenshots
The text was updated successfully, but these errors were encountered:
Description
Harper doesn't interpret "1s" and "0s" as nouns. It seems "1" and "0" as numbers despite their suffixes. It sees "s" and "and" as adjacent words.
We could add a lexer for suffixed numbers or just suffixed single digits that returns word type.
We'd have to take into account at least:
-s
suffix on numbers can have other meanings, such as "seconds".-'s
suffix for plurals for things like single letters, digits, acronyms, etc.Actually can we add numbers to the curated dictionary? Wouldn't make sense for most numbers or even the other single digits. I'll check this... OK it makes no difference. No tests fail but behaviour doesn't change. I think this is due to the lexical analysis having higher priority than the dictionary lookup? The numbers get lexed as numbers rather than words so there is no chance for
1s
and0s
to be looked up in the dictionary.Resources
If the problem is not obvious, some online resources clarifying the relevant grammar point can be useful.
Screenshots
The text was updated successfully, but these errors were encountered: