Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Feb 21 13:41

    mrob95 on master

    Deprecation notice (compare)

  • Feb 21 13:38

    mrob95 on master

    Deprecation notice (compare)

  • Feb 20 20:25

    mrob95 on master

    Update README.md (compare)

  • Feb 02 17:15

    mrob95 on master

    Move logging set up above drago… (compare)

  • Jun 02 2020 19:38
    mrob95 opened #22
  • Jun 02 2020 19:36

    mrob95 on texmaker

    Add basic TeXMaker support (compare)

  • Apr 24 2020 07:18

    mrob95 on master

    Create requirements.txt (compare)

  • Apr 24 2020 07:17

    mrob95 on master

    Create install.bat (compare)

  • Jan 31 2020 21:25

    mrob95 on master

    change to \(\) for inline math,… add equation* and align* update docs and 2 more (compare)

  • Jan 31 2020 21:25
    mrob95 closed #21
  • Jan 31 2020 21:25
    mrob95 commented #21
  • Jan 31 2020 19:03
    annakirkpatrick opened #21
  • Jan 26 2020 14:38

    mrob95 on master

    (compare)

  • Jan 26 2020 14:34

    mrob95 on breathe

    Transition sublime and template Update dependencies Add install script and 2 more (compare)

  • Jan 15 2020 20:50

    mrob95 on master

    Create LICENSE (compare)

  • Nov 17 2019 14:49

    mrob95 on master

    Add core context (compare)

  • Nov 17 2019 14:28

    mrob95 on master

    Add install script (compare)

  • Nov 01 2019 07:33

    mrob95 on master

    Update dependencies (compare)

  • Oct 27 2019 17:56
    mrob95 synchronize #19
  • Oct 27 2019 17:56

    mrob95 on languages

    Improve formatting (compare)

Mike Roberts
@mrob95

@quintijn good to hear :-) sorry about the email, it is redirecting to my old university email which is no longer valid, I'll update it.

Let me know if there is anything I can do, and if you want to make a pull request for the Dutch translations or just post them in here then that would be a good addition. I set it up so that most of the standard operations which a user might want to tweak are in the TOML configuration files, but that's obviously not particularly powerful for anything more than inserting characters or executing keystrokes. If anything more complex is required then that should be easily doable on the dragonfly side.

Quintijn Hoogenboom
@quintijn
@mrob95 has there ever been a thought about other user languages? Because I am working in 2 languages, that was always an essential part for me. All Vocola commands can be defined in each language, as you have to do it yourself. And all Unimacro grammars are "translatable". I think this will not be too easy for Dragonfly/Caster/Mathfly to realise I fear.
Mike Roberts
@mrob95
I haven't really thought about it, but I don't think it would be too difficult to manage. There would just need to be a setting in the settings file to switch language, or it could probably pull this from natlink. Then we just use a different set of config files, or maybe even a different set of files entirely.
Dragonfly has some support for multiple languages, but this is mainly limited to integers
Quintijn Hoogenboom
@quintijn
I was studying the lyx_nested rules, with integral etc. and I was wondering where to find the <sequence1>, <sequence2> etc. rules. Maybe you can help. Because the CCR is so important, and the _keystrokes.py grammar of Unimacro focusses on those, I was thinking about an effort to implement the same there. See how the one and the other performs.
@mrob95 well, integers are on the hardest to tackle! Unimacro has also quite complicated rules to catch numbers, and a quick try with your examples of 416 showed me "mine" seem to be better. It was original a grammar of Joel Gould in his first examples he gave, now nearly 20 years ago!!!!
For the symbols it could be good not to throw away all the english words, as a lot of things are possibly better memorised in english.
Quintijn Hoogenboom
@quintijn
"new math line | nieuwe math regel" = "escape:10, end, enter, c-m"
"squared| kwadraat"                         = "caret, 2, right"
"cubed|derde macht"                           = "caret, 3, right"
"inverse"                         = "caret, minus, 1, right"
"(parens | parentheses | haakjes)"          = "a-m, lparen"
"square brackets| brekkits | vierkante haakjes" = "a-m, lbracket"
"curly brackets | accolades"                  = "a-m, lbrace"
something like this. It is eventually up to the user to decide what words to use.
Mike Roberts
@mrob95

CCR is complicated, as you probably know, and I am more or less just hacking on top of caster's implementation.

There are some details on the mathfly site, but the the way it is all done is to merge everything that can be recognised in the current context into one rule, and then allow repetitions of that rule. The structure is something like

Rule(
    Repetition(
        Alternative(
            Compound("command one"->action)
            Compound("command two"->action)
            Compound("command three"->action)
        )
    )
)
That is the theory at least, the implementation is nowhere near as nice as I think it could be, and I'm working at the moment on completely re-implementing it.
Quintijn Hoogenboom
@quintijn
As another (general) example, I use "show messages" and "refresh messages" in both English and Dutch speech profiles. Dutch are then lucky that the languages are a bit similar. With French, Spanish or Italian it will get a lot more difficult.
Mike Roberts
@mrob95
Am I right in thinking that natlink can grab the current profile language?
Quintijn Hoogenboom
@quintijn
O yes! I look it up!
Mike Roberts
@mrob95
If so then at least a first implementation would just be to get the current language and redirect to e.g. "lyx_nl.toml"
Quintijn Hoogenboom
@quintijn
import natlinkstatus
language = natlinkstatus.getLanguage()
If would suggest to take nld for dutch as the language is returned so. If it is different from enx use the _nld etc. If it is enx (English) just keep it as it is.
Language in Dragon conventions is always a 3 letter code. In natlinkstatus.py (in the natlink core directory) are they all listed.(line 238)
Thanks Mike, I must quit here for the moment.
Mike Roberts
@mrob95
No worries, I guess you can keep going just adding alternatives for now? Might take me a couple of days to have a look at this
Mike Roberts
@mrob95
Very rough and I haven't done any testing with it, but theoretically at least you should be able to dump some new toml files in config/nld/ which will be imported if the language setting is equal to nld. English will always be used as a fallback
Mike Roberts
@mrob95

Major architectural change. Before updating you will need to run

pip install dfly-breathe

I have entirely replaced the old caster-based CCR backend with Breathe, a library I've been working on. Should make it much easier to add support for new apps etc, and I have fully fleshed out the NestedRule concept which was originally prototyped here. Please let me know if there are any issues.

esc123
@esc123
Cool, Ill give it a test run in the next few days
LexiconCode
@LexiconCode
Were is 'NestedRule' used?
Mike Roberts
@mrob95

Well basically I wanted rules that were like:

Integral from <stuff1> to <stuff2>

Where stuff was a sequence of any other ccr commands. Nested rules were the first implementation based on Caster, breathe allows this by allowing the user to add custom top-level rules. The mathfly examples are in e.g. lyx.py at the bottom but may be slightly difficult to understand at a glance, there are clearer examples on the breathe readme which show greedy dictation and optional repeat values using the same feature.

You just have to define a CommandsRef extra which references a sequence of commands and then include an Exec action to execute the sequence
LexiconCode
@LexiconCode
Awesome I look forward to tinker with mathfly in next few weeks :)
Mike Roberts
@mrob95
Greedy dictation was a feature I really wanted in Breathe, the fact that I could do this as well using the same feature is a nice bonus ;)
esc123
@esc123
started up mathfly again for a new semester after spending the holidays tinkering with caster and I was met with "bad grammar - grammar too complex". The last week or two of the previous semester I was also getting this error and I assumed it was because I edited the toml files and probably did something wrong.
Mike Roberts
@mrob95
Hmmm, are you using the latest (Breathe) version?
esc123
@esc123
however I just installed a fresh version of mathfly with no edits to the toml files and although everything starts up as normal via the nat link window, as soon I execute a command in scientific notebook natlink spits out grammar too complex error
is Breathe the newest version of mathfly?
I had saved version of mathfly that i had used prior to a major update a while back and this version does not suffer from this error
perhaps there is some dependencies that I'm missing. Would there be any way of checking?
Mike Roberts
@mrob95
Ok sorry about that, sounds like I just pushed the limit a bit too far ^^
esc123
@esc123
oh? perhaps it's an issue with my machine in particular
oldish tablet surface pro 4 with eight gigs of RAM. Would that be an issue do you think?
Mike Roberts
@mrob95
I'm not quite sure how the grammar complexity is calculated, I'll look into it at the weekend. I don't think hardware should be a problem
Just to check, try saying "disable LaTeX" to make sure multiple grammars aren't active at the same time
esc123
@esc123
I ran the dependencies.bat script and restarted Dragon. Now the bad grammar error occurs directly after start-up before even initiating a command.
I disabled latex and now attempting to execute commands using scientific notebook mathfly is responding but the bad grammar error is repeated in the natlink window after every command
Mike Roberts
@mrob95
Hmm okay, I haven't actually added any new features so you wouldn't be losing anything by staying on an old version while I fix this
esc123
@esc123
regarding the grammar complexity issue. I remember coming across an article on synkarius blog a while back
that addressed the issues revolving around grammar complexity
yeah that's no problem at all. I'll be switching back to the older version now as its working perfectly
thanks for getting back to me. I know you must be busy going through all that 20 year old natlink python code.
appreciate your work!
Mike Roberts
@mrob95
Haha, for the moment we're stuck at the "Dragon crashes every time I try to load a Python 3 grammar" stage. Love PY3!
esc123
@esc123
lol good times!