Adding hyperlinks to notes in Mermaid Sequence Diagrams - hyperlink

I've looked through the mermaid sequence diagram docs and found how to add links to actors in a sequence diagram, but I'm interested in adding links to a note.
I found that <br> is supported in notes but other tags are not. Is this possible?
sequenceDiagram
participant Alice
participant John
links Alice: {"Dashboard": "https://dashboard.contoso.com/alice", "Wiki": "https://wiki.contoso.com/alice"}
links John: {"Dashboard": "https://dashboard.contoso.com/john", "Wiki": "https://wiki.contoso.com/john"}
Alice->>John: Hello John, how are you?
John-->>Alice: Great!
Alice-)John: See you later!
Note over Alice, John: I want to<br>be a link

This may relate to your question: Try this chart below - if you click it, you will be redirected to Google.
The trick here is to combine the image and link functions in markdown.
[![](https://mermaid.ink/img/pako:eNo1j8EKwjAQRH9l3avtD-RQETyo4MlrLksytYU00TRBSum_m7a4p2F4w87MbIIFKx7xyfAGl15eUQbtqdzZ9QZ10xzvofOKrnAu0Kor6sKXJIKmkE87vPp1gestpehGLeDoFSHpwBUPiIP0tvya14Dm1GGAZlWkRSvZJc3aLwWVnMJz8oZVihkV57eV9K_GqhU3Fhe2TyE-9v7bjOUHTYdELA?type=png)](https://mermaid.live/edit#pako:eNo1j8EKwjAQRH9l3avtD-RQETyo4MlrLksytYU00TRBSum_m7a4p2F4w87MbIIFKx7xyfAGl15eUQbtqdzZ9QZ10xzvofOKrnAu0Kor6sKXJIKmkE87vPp1gestpehGLeDoFSHpwBUPiIP0tvya14Dm1GGAZlWkRSvZJc3aLwWVnMJz8oZVihkV57eV9K_GqhU3Fhe2TyE-9v7bjOUHTYdELA)
While it is possible to add link (I have read about it in the mermaid.js book and will get back to you in the near future), but depends on the format of the output (.png, etc) you may lost this function after rendering. The only format that makes it possible is html. As:
Possible Values You Can Set securityLevel to: … loose: Mermaid will
allow HTML tags in text. The interactivity in the diagrams provides
support for click events.
Page 83, The Official Guide to Mermaid.js by Kunt Sveidqvist & Ashish Jain

Related

Do some keywords exist in markdown or latex to help classifying documents?

I can use {#myAnchor} at the end of a header to help targeting an url link on it,
and they're also \ref like keywords in latex, to travel inside a document,
but what is the best way to add some kind of metadata like :
category: analysis
teaching-unit: A056
(title and subtitle of my document being already used for human-reading purposes)
where, if possible, some statements (pandoc, grep statements?) would have for purpose, later, to "somewhat query", these documents, to find those having some keywords?
Of course, I can put something like:
category: analysis
in my header section. But is there something that is already designated for the classification I am willing to do?

Show just a sample of text in search results

I'm using ReactiveSearch (great Search UI library!) and am trying to figure out how I can just show a ample of a text article in the ReactiveList search results. Currently it shows the whole article but I just want the first 250 words or so to be displayed.
I just want say the first 250 words of that. Is that possible with ReactiveList? If so, how can I go about doing that or is there a feature o setting that I'm missing with ReactiveSearch?
This is the simple line that displays it currently:
<p className="card-text">{data.Text}</p>
It is possible to truncate the text after a few lines. But ReactiveSearch doesn't support this feature on the library level.
You can achieve this by using the package called react-truncate. You can read the documentation here.
Hope this helps!

How can I cluster similar type of sentences based on their context and extract keywords from them

I wanted to cluster sentences based on their context and extract common keywords from similar context sentences.
For example
1. I need to go to home
2. I am eating
3. He will be going home tomorrow
4. He is at restaurant
Sentences 1 and 3 will be similar with keyword like go and home and maybe it's synonyms like travel and house .
Pre existing API will be helpful like using IBM Watson somehow
This API actually is doing what you are exactly asking for (Clustering sentences + giving key-words):
http://www.rxnlp.com/api-reference/cluster-sentences-api-reference/
Unfortunately the algorithm used for clustering and the for generating the key-words is not available.
Hope this helps.
You can use RapidMiner with Text Processing Extension.
Insert each sentence in a seperate file and put them all in a folder.
Put the operators and make a design like below.
Click on the Process Documents from files operator and in the right bar side choose "Edit list" on "Text directories" field. Then choose the folder that contains your files.
Double click on Process Documents from files operator and in the new window add the operators like below design(just the ones you need).
Then run your process.

Wikipedia: When were links added?

I would like to know how to extract all the Wikipedia links that were added and removed within a time window for a specific article in Wikipedia.
So far I know how to extract Wikipedia revisions in this questions: How to get full Wikipedia revision-history list from some article?
And how to do it for a specific time window: API to get Wikipedia revision id by date
For example, here is how I obtain the content of the revision for a time window for the article Germanwings_Flight_9525 :
https://en.wikipedia.org/w/api.php?action=query&format=xml&prop=revisions&rvlimit=500&titles=Germanwings_Flight_9525&rvstart=20150325180000&rvend=20150323180000&rvprop=ids|timestamp|content
How to obtain the links added and removed?
Thanks
You could retrieve all the revisions, split them by "[[" and look for the next "|" or "]" character. With that you find all the links, which you can collect in a list or something in order to recognize new ones.

opennlp does not recognized twiiter input

I have a file that contain twitter post and I am trying to identify the structure of the twitter post per line, like get the noun ,verb and stuff, using opennlp.
it work perfectly until it reach line that contain hashtag and link only
example :
#birthday www.mybirthday/test/mypi.com
and give error com.cybozu.labs.langdetect.LangDetectException: no features in text
when I write a sentence next to the line it just work. any idea how to handle it?? there are more then thousand line that almost like the example.
To use the POS tagger, you need to pass tokens, (in laymen terms say individual words). The link contains multiple words separated by a slash /. The link in itself is not associated with any Part Of Speech. See here the list of tags and how they are assigned to a word. If you want it to identify your link, and give a separate tag to it, say LN either give your own training data, here you will know how to create the training dataor separate the words in the link as separate token (you can separate a link by slash/, question mark?, equal to sign = or ampersand (&)) to get the underlying words and then use the POSTagger to get Part Of Speech (similar case for the hash tag.) For tokenization also, you can use opennlp tokenizer and for your special case, train it. Go through the documentation, it will help you a lot.

Resources