Message Boards Message Boards

[WSS22] Extracting linguistic relations fr. word embeddings&language models

Posted 7 months ago
2 Replies
13 Total Likes
2 Replies

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: Moderation Team

How would you convert TextStructure into a list of vertices that are directed from the first member of the list to the next and then the next? For example,

TextStructure["Jupiter is the biggest planet in our solar system, \
eleven times bigger in diameter than Earth and two-and-a-half times \
more massive than all the other planets put together. Jupiter has no \
solid surface. Beneath the gas clouds lies hot, liquid hydrogen, then \
a layer of hydrogen in a form similar to liquid metal, and finally a \
rocky core. Jupiter has a faint ring around its equator made of \
microscopic dust particles.", "DependencyGraphs"]

The directed lists which generate the abstraction graphs in natural language processing really aid in the visualization of latent spaces.

enter image description here enter image description here enter image description here enter image description here

What would you do if you wanted to create the directed list with, instead of natural numbers, strings of words? Which is to generate list-oriented DirectedEdges.

With[{text = 
    "What do you call an arrow function that cares about where it is \
invoked & called (for example, not about where it is defined)? The \
idea is that the 8 year old has a lot to look forward to, therefore \
is most analogous to the arrow function; he's taking his true calling \
and following the laws of physics, rather than being affected by the \
laws of physics. He thus finds the illogical arrangement in the data, \
caring about the logical progression of the data (for example, not \
its definition).", {" ", ". ", ", ", "
    Select[Thread[Rule[Drop[text, -1], Drop[text, 1]]], 
     UnsameQ[#, {}] &]]], VertexLabels -> "Name"]]

enter image description here

POSTED BY: Dean Gladish
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract