📺
blog.tensorflow.org
is a new plugin for ) on your own data, right from a spreadsheet.
Where do these numbers come from? They’re learned by a machine learning model through many bits of conversational and language data. By showing all those examples, the model learns which words tend to occur in the same spots in sentences.
Consider these two sentences:
- “My mother gave birth to a son.”
- “My mother gave birth to a daughter.”
Semantic Reactor: Prototype using NLP in a Google Sheet
Alright, now onto the fun part: Building things! There are three NLP models available in the Semantic Reactor:- that can run entirely within a webpage.
- - A full-sized Universal Sentence Encoder model trained on question/answer pairs in 16 languages.
- Semantic Similarity: How similar are two blocks of text?
Great for applications where you can anticipate what users might ask, like an FAQ bot. (Many customer service bots use semantic similarity to help deliver good answers to users.) - Input / Response: How good of a response is one block of text to another?
Useful for when you have a large, and constantly changing, set of texts and you don’t know what users might ask. For instance, model.
As mentioned, there are lots of great uses for NLU tech, and more interesting applications come out almost everyday. Every digital assistant, customer service bot, and search engine is likely using some flavor of machine learning. Smart Reply and Smart Compose in Gmail are two well-used features that make good use of semantic tech.
However, it’s fun and helpful to play with the tech within applications where the quality demands aren’t so high, where failure is okay and even entertaining. To that end, we’ve used the same tech that’s within the Semantic Reactor to create a couple of example games. uses semantic similarity.
Playing those two games, and finding out where they work and where they don’t, might give you ideas on what experiences you might create., a word-association game powered by word embeddings. is a simple game powered by NLU and available as open source code. (It’s also playable , a former game designer at Double Fine who now works with Stadia. She used Semantic Reactor to prototype a video game world that infers how the environment should react to player inputs using ML. Check out our conversation ) considers all of the possible ways the game might respond: - “Fox turns on lights.“
- “Fox turns on radio.“
- “Fox move to you.“
- “Fox brings you mug.“
Let’s see how you might build something like Anna’s game with Semantic Reactor (for all the nitty gritties of the fox demo, check out her Clicking “Start” will open a panel that allows you to type in an input and hit “React”:.
Let’s take a look at how to use those models in JavaScript, so that you can convert your spreadsheet prototype into a working app.
1 - Create a new Node project and install the module:2 - Create a new file (use_demo.js) and require the library:TEXTnpm init
npm install @tensorflow/tfjs @tensorflow-models/universal-sentence-encoder3 - Load the model:TEXTrequire('@tensorflow/tfjs');
const encoder = require('@tensorflow-models/universal-sentence-encoder');4 - Encode your sentences and query:TEXTconst model = await encoder.loadQnA();5 - Voila! You’ve transformed your responses and query into vectors. Unfortunately, vectors are just points in space. To rank the responses, you’ll want to compute the distance between those points (you can do this by computing the between points):TEXTconst input = {
queries: \["I want some coffee"\],
responses: \[
"I grab a ball",
"I go to you",
"I play with a ball",
"I go to school.",
"I go to the mug.",
"I bring you the mug."
\]
};
const embeddings = await model.embed(input);If you run this code, you should see output like:TEXT//zipWith :: (a -> b -> c) -> \[a\] -> \[b\] -> \[c\]
const zipWith =
(f, xs, ys) => {
const ny = ys.length;
return (xs.length .map((x, i) => f(x, ys\[i\]));
}
// Calculate the dot product of two vector arrays.
const dotProduct = (xs, ys) => {
const sum = xs => xs ? xs.reduce((a, b) => a + b, 0) : undefined;
return xs.length === ys.length ?
sum(zipWith((a, b) => a * b, xs, ys))
: undefined;
}Check out the full code sample .TEXT[
{ response: 'I grab a ball', score: 10.788130270345432 },
{ response: 'I go to you', score: 11.597091717283469 },
{ response: 'I play with a ball', score: 9.346379028479209 },
{ response: 'I go to school.', score: 10.130473646521292 },
{ response: 'I go to the mug.', score: 12.475453722603106 },
{ response: 'I bring you the mug.', score: 13.229019199245684 }
]↗ Original-Artikel auf blog.tensorflow.org lesenVollständiger Original-BerichtAusführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf blog.tensorflow.org.Wie bewertest du diesen Beitrag?1 Klick FeedbackTeilen mit Netzwerk & Team:Hat Ihnen dieser Tipp / Anleitung geholfen?Community-Analysen & Experten-Meinungen 0
Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf „ Eigene Analyse verfassen“!Community Pulse: Relevanz-Einschätzung1 Klick Experten-Votum🔴 Akute Relevanz 0%🟡 In Evaluierung 0%🟢 Keine Auswirkung 0%Spannende Innovation 0%Port 8095 EngineVerwandte Story-Cluster & Quellen (Vektor-KI)
Tipp: Mit Pfeiltasten [ ← ] und [ → ] blättern
Ähnliche Beiträge
🔍 Verwandte NewsAuch interessante Nachrichten Introducing Semantic Reactor: Explore NLP in Google Sheets
Thematisch verwandte Begriffe: Introducing, Semantic, Reactor, Explore · 6 Treffer
🔧 AI Nachrichten MacDailyNewsApple accuses OpenAI of destroying evidence as trade-secrets fight intensifies
🔧 AI Nachrichten The Mac ObserverGPT-6 Astra Release Today? OpenAI’s Next Major AI Model Is Almost Here
Laden...Videos werden geladen ...
Laden...Beiträge werden geladen ...
Laden...Videos werden geladen ...
Laden...Beiträge werden geladen ...
Laden...Videos werden geladen ...
Laden...Beiträge werden geladen ...
Laden...Videos werden geladen ...
Laden...Beiträge werden geladen ...
Laden...Videos werden geladen ...
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.📂 News ⏱️ 3 Min vor 10 MinArtikeldaten werden geladen...Zum Aktualisieren ziehen
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms LadezeitInstalliere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.
Nächster Beitrag🤖Community Radar & Live Chat
Sentinel Bot online • Live-StreamDein Cluster: Security Explorer👥 Match:lädt…📡 Aktivitäten deiner Analysten
lädt…💡 Neues Thema oder Eilmeldung einreichen
Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.
🔥 Heiß diskutierte Einreichungen
- “Fox turns on lights.“
SOCIAL SHARE CARD GENERATOR