I think this is an example closer to the requirements of the question:
dynamic linkage of LocatorPane and InputField.
InputField and Overlay and
DynamicModule[{z = 120},
Panel@Column[{Style["Degree", 16],
Overlay[{Experimental`AngularSlider[
Dynamic[z, (z = Round[#, 1]) &], {0, 360},
Experimental`BoundaryAction -> "Wrap", ImageSize -> 200],
Graphics[{Text[
Framed[Style[Dynamic[Round[z, 1]] \[Degree], 16],
FrameStyle -> None], Scaled@{3/4, 4/10}, {-1, 1}],
Text[Framed[Style[Dynamic[Round[z Degree, Pi/2^7]], 16],
FrameStyle -> None], Scaled@{3/4, 4/10}, {-1, -1}]}]}, All,
1], InputField[Dynamic[z, (z = Round[#, 1]) &],
ImageSize -> {100, 24}, BaseStyle -> 16]}, Alignment -> Center]]
.
This is an example moving the framed text around even in a plot:
automatic-placement-of-legend-box-with-placed-equivalent-to-best-in-matplot
This shows how to define Your own overlay graphics and display them dynamically over a given background object:
optional-grid-in-overlay
From the Mathematica Overlay documentation stems the idea to overlay plot on texts:
Overlay[{StringTake[ExampleData[{"Text", "ToBeOrNotToBe"}], 400],
Plot[Sin[E^-x], {x, 0, 5}]}]
The splines are done with Spline offered in the standard of Mathematica.
There is only the need to put this all together. There is an example over at the Mathematica Demonstration named Pottery Wheel to draw such nice Splines.
Only some simple steps to show such a nice text analysis in a slide show.
There are several problems open in this free sketch of a solution.
First we need a graphic primitive how to highlight the pos
"word" //
Framed[#, FrameStyle -> Red, RoundingRadius -> 10,
FrameMargins -> 10, Background -> Lighter@LightRed] &
This only works in the postfix form!
Now we need to get the pos tags into our text. It turns out that only
TextStructure["The cat sat on the mat.", "ConstituentStrings"]
works. The output is
{"(Sentence, ((NounPhrase, (Determiner, The), (Noun, cat)), \
(VerbPhrase, (Verb, sat), (PrepositionalPhrase, (Preposition, on), \
(NounPhrase, (Determiner, the), (Noun, mat)))), (Punctuation, .)))"}
That is not a string in Mathematica nor an expression.
We have to get rid of the Sentence and the Punctuation, and if punctuation is in the text we have to extra handle this as well.
I skip this passage and will add it later.
It is possible to cut text into sentences with a built-in.
After having converted the above construct to a string we can proceed further.
A possible reduction is
Grid[Partition[(Framed[#,
FrameStyle ->
Switch[ToString[#], "NounPhrase", Red, "Noun", Red,
"Determiner", Red, "VerbPhrase", Blue, "Verb", Blue,
"PrepositionalPhrase", Green, "Preposition", Green, _,
False], RoundingRadius -> 10, FrameMargins -> 10,
Background ->
If[Switch[ToString[#], "NounPhrase", True, "VerbPhrase", True,
"PrepositionalPhrase", True, _, False], LightGreen,
If[Switch[ToString[#], "Determiner", True, "Noun", True,
"Verb", True, "Preposition", True, _, False], LightRed,
LightBlue]]] & /@ {NounPhrase, Determiner, The, NounPhrase,
Noun, cat, VerbPhrase, Verb, sat, PrepositionalPhrase,
Preposition, on, NounPhrase, Determiner, the, NounPhrase, Noun,
mat}), 3] // Transpose]
This avoid the splines for the commentary texts to the in text places of the tags. It only uses POS tagging as built-in.
There is a nice solution how to do it on this community is places are well-defined: how can i route edges manually for a graph.
This is still far from this:
The biggest problem seem how to step further from POS tagging to the sentiment tagging of the original?
At present, I think on this AmbiguityFunction. We possibly need AmbiguityList.
Some insider hint was that the document was done in https://www.v7labs.com/document-processing!
FlipView
) pasted into a Mathematica notebook wolframdatasummit.org/2014/attendee/presentations $\endgroup$