Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entries should be scanned for matches once a [[topic]] exists #26

Open
Travis42 opened this issue Apr 10, 2020 · 3 comments
Open

Entries should be scanned for matches once a [[topic]] exists #26

Travis42 opened this issue Apr 10, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@Travis42
Copy link

Travis42 commented Apr 10, 2020

I like the Roamlike feature, but I think it could be better:

  • once a [[topic]] is designated and wikilinked, the program should scan all entries for 'topic' and add a wikilink, for inclusion in the graph. Right now it doesn't do that...I tested it.
@KnowledgeGarden
Copy link
Owner

I am a huge fan of the idea that you save a note and after a while, it appears with all the known topics identified, then you identify new ones to add to its internal collection.
It does not do that because there are so many other things which come before that, the large one being conversation from the simple JSON database to the SQL database sqlite3.
When you think about the computational complexity of doing that pattern recognition, it is combinatoric in the sense of NumWords in the note times NumTopics available.
Javascript being single threaded doesn't make that trivial; it's not like in Java where you spin up a background thread and let it run on its own.
There may be these possibilities:

  • A javascript WebWorker (don't know much about them yet)
  • An external agent which monitors events and does, in another javascript thread, that kind of work.
    The last one is difficult because the SQL database is not client-server, it is embedded and the file will not submit to being opened by two processes.

In the long run, an advanced version of LiteNet will become client-server with a powerful backside capable of doing far more things than we can now.

@KnowledgeGarden KnowledgeGarden added the enhancement New feature or request label Apr 10, 2020
@Travis42
Copy link
Author

Not a bad point about the runtime. Maybe a way around it would be if there were a function that checked onChange the entry to see if it matches any wikilinks and then suggests adding a wikilink to matched words. There should be far less wikilinks than total words, and we're only checking the current entry, so it should be less computationally intense.

@KnowledgeGarden
Copy link
Owner

The way I imagine it working is that, for each topic label, write a RegEx which finds each instance and replaces with [[]]; On my current localhost system, I am up to 175 distinct topics. That could grow into the thousands over time. Right now, it would work reasonably well, but later...

As a matter of fact, the present codebase is written in plain vanilla node.js and is not event-based;
AppRun is an event-based node system which would be ideal for this, but in some sense, there is interested in rewriting everything into something a bit more reactive - Vue, Clojurescript, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants