RunMat
  • Pricing
RunMat
GitHub
GitHub
Sign inTry in browser
DesktopRuntimePhysicsCADAdministrationAgent

Get RunMat updates

New releases, guides and examples.

Product+
  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download
Math+
  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting
Physics+
  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA
Industries+
  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance
Learn+
  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students
Compare+
  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons
Company+
  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms

Product

  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download

Math

  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting

Physics

  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA

Industries

  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance

Learn

  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students

Compare

  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons

Company

  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms
GitHubXLinkedIn

© Dystr, Inc. · RunMat v0.7.1, Nov 17, 2026

RunMat® is a registered trademark of Dystr, Inc. MATLAB® is a registered trademark of The MathWorks, Inc. RunMat is not affiliated with, endorsed by, or sponsored by The MathWorks, Inc.

/
See all docs
Builtin Reference
    • addDependencyDetails
    • addEntityDetails
    • addLemmaDetails
    • addPartOfSpeechDetails
    • addSentenceDetails
    • addTypeDetails
    • bagOfNgrams
    • bagOfWords
    • cosineSimilarity
    • doc2sequence
    • encode
    • extractFileText
    • extractHTMLText
    • fastTextWordEmbedding
    • findElement
    • getAttribute
    • htmlTree
    • ind2word
    • isVocabularyWord
    • normalizeWords
    • readWordEmbedding
    • removeLongWords
    • removeShortWords
    • removeStopWords
    • removeWords
    • stopWords
    • tokenDetails
    • tokenizedDocument
    • trainWordEmbedding
    • vaderSentimentScores
    • vec2word
    • word2ind
    • word2vec
    • wordEncoding
    • writeWordEmbedding

vaderSentimentScores — Score English tokenized documents with VADER-style rules.

vaderSentimentScores returns compound and optional positive, negative and neutral host scores for English tokenizedDocument inputs.

Syntax

compoundScores = vaderSentimentScores(documents)
compoundScores = vaderSentimentScores(documents,Name,Value)
[compoundScores,positiveScores,negativeScores,neutralScores] = vaderSentimentScores(___)

Inputs

documents
Type
Any
Required
Yes
Description
tokenizedDocument object.
NameValue
Type
Any
Required
Variadic
Description
Name-value options: SentimentLexicon, Boosters, Dampeners, Negations.
NameTypeRequiredDefaultDescription
documentsAnyYes—tokenizedDocument object.
NameValueAnyVariadic—Name-value options: SentimentLexicon, Boosters, Dampeners, Negations.

Returns

compoundScores
Type
NumericArray
Description
Compound VADER-style sentiment score for each document.
positiveScores
Type
NumericArray
Description
Positive sentiment proportions.
negativeScores
Type
NumericArray
Description
Negative sentiment proportions.
neutralScores
Type
NumericArray
Description
Neutral token proportions.
NameTypeDescription
compoundScoresNumericArrayCompound VADER-style sentiment score for each document.
positiveScoresNumericArrayPositive sentiment proportions.
negativeScoresNumericArrayNegative sentiment proportions.
neutralScoresNumericArrayNeutral token proportions.

Returned values from vaderSentimentScores depend on how many outputs the caller requests.

Errors

RunMat:vaderSentimentScores:InvalidInput
When
Inputs do not match supported vaderSentimentScores forms.
Message
vaderSentimentScores: invalid input
IdentifierWhenMessage
RunMat:vaderSentimentScores:InvalidInputInputs do not match supported vaderSentimentScores forms.vaderSentimentScores: invalid input

Supported forms

compoundScores = vaderSentimentScores(documents)

compoundScores = vaderSentimentScores(documents, Name, Value)

[compoundScores,positiveScores,negativeScores,neutralScores] = vaderSentimentScores(___)

Numeric column vectors with one score per input document.

SentimentLexicon must be a table with Token and SentimentScore variables.

Token entries in a custom lexicon must be nonempty lowercase strings.

SentimentScore entries must be finite single, double, or native integer values in [-4, 4].

Boosters, Dampeners, and Negations must contain at least one word or n-gram when supplied.

Only English tokenizedDocument inputs are accepted.

Inputs and sentiment rules

vaderSentimentScores accepts an English RunMat tokenizedDocument. One output is the compound score; four requested outputs additionally return positive, negative and neutral proportions. Each is a host double column vector with one entry per document.

Compound scores lie in [-1,1] and apply booster, dampener, negation, capitalization and punctuation modifiers to token sentiment. The compact default English lexicon covers common scripts; domain-specific or full-coverage scoring should pass a SentimentLexicon table. Exact MATLAB VADER scoring parity remains open.

SentimentLexicon requires Token and SentimentScore variables. Tokens are nonempty lowercase strings. Scores are finite single, double or any native integer in [-4,4]; integer scores are range-checked exactly before floating computation.

Boosters and Dampeners accept string, character, cell or string-array word lists. Column vectors are word lists; multi-column string arrays are row-wise n-grams with empty padding ignored. Negations accepts the same text forms as word lists. Supplied modifier lists must be nonempty.

Execution

Text and object processing is host-only. Supported resident payloads within the supplied objects may gather through their owner; there is no provider scoring kernel.

Examples

Score tokenized documents

documents = tokenizedDocument(["The book was VERY good!!!!"; "The book was not very good."]); compoundScores = vaderSentimentScores(documents)

Expected output:

A double column vector with one score per document.

Return sentiment proportions

documents = tokenizedDocument(["good"; "bad"]); [compoundScores,positiveScores,negativeScores,neutralScores] = vaderSentimentScores(documents)

Expected output:

Four double column vectors.

Use a custom lexicon

documents = tokenizedDocument("innovative risk"); tbl = table(["innovative"; "risk"], [4; -3], "VariableNames", ["Token", "SentimentScore"]); compoundScores = vaderSentimentScores(documents, "SentimentLexicon", tbl)

Expected output:

The custom table replaces the compact default lexicon.

Using vaderSentimentScores with coding agents

Open a RunMat example with live inputs, then ask the agent to explain how vaderSentimentScores changes the result.

Run a small vaderSentimentScores example, explain the result, then change one input and compare the output.

FAQ

Does RunMat include MATLAB's full VADER lexicon?⌄

Not yet. It includes a compact default lexicon and supports custom SentimentLexicon tables.

Can I provide modifier lists?⌄

Yes. Boosters, Dampeners and Negations are applied to sentiment-bearing tokens.

Does scoring execute on the GPU?⌄

No. Scoring processes host text/object data and returns host double vectors.

Related Strings functions

Text Analytics

addDependencyDetails · addEntityDetails · addLemmaDetails · addPartOfSpeechDetails · addSentenceDetails · addTypeDetails · bagOfNgrams · bagOfWords · cosineSimilarity · doc2sequence · encode · extractFileText · extractHTMLText · fastTextWordEmbedding · findElement · getAttribute · htmlTree · ind2word · isVocabularyWord · normalizeWords · readWordEmbedding · removeLongWords · removeShortWords · removeStopWords · removeWords · stopWords · tokenDetails · tokenizedDocument · trainWordEmbedding · vec2word · word2ind · word2vec · wordEncoding · writeWordEmbedding

Transform

append · deblank · erase · eraseBetween · erasePunctuation · eraseURLs · extractAfter · extractBefore · extractBetween · insertAfter · insertBefore · join · lower · pad · replace · replaceBetween · reverse · split · splitlines · strcat · strip · strjoin · strjust · strrep · strsplit · strtrim · upper

Core

blanks · char · compose · convertCharsToStrings · convertContainedStringsToChars · convertStringsToChars · genvarname · int2str · isletter · isspace · isStringScalar · isstrprop · mat2str · native2unicode · newline · num2str · sprintf · sscanf · str2double · str2num · strcmp · strcmpi · string · string.empty · strings · strlength · strncmp · strncmpi · strtok · unicode2native

Search

contains · endsWith · matches · startsWith · strfind

Pattern

digitsPattern · lettersPattern · pattern · regexpPattern · textBoundary · wildcardPattern

Regex

regexp · regexpi · regexprep

Source you can read

Every RunMat function's source is public. Read exactly how vaderSentimentScores is executed, line by line, in Rust.

  • View the source for vaderSentimentScores in Rust on GitHub
  • Learn how the RunMat runtime works
  • Found a bug? Open an issue with a minimal reproduction.

About RunMat

RunMat is a runtime that executes MATLAB-syntax code fast on any GPU. The runtime is free for individuals, including freelancers; students and faculty at an academic institution, for teaching or research there; contributors to an open-source project, for work on that project; organizations with 250 or fewer people and US$10M or less in annual revenue; and anyone, for non-production use. See runmat.com/license.

  • RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
  • Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.

Getting started · Benchmarks · Pricing

Download RunMat

Download RunMat for full performance, or use RunMat in your browser for zero setup.

Download RunMatOpen Sandbox
On this page
  • Syntax
  • Inputs
  • Returns
  • Errors
  • Supported forms
  • Inputs and sentiment rules
  • Execution
  • Examples
  • Score tokenized documents
  • Return sentiment proportions
  • Use a custom lexicon
  • Using vaderSentimentScores with coding agents
  • FAQ
  • Related Strings functions
  • Text Analytics
  • Transform
  • Core
  • Search
  • Pattern
  • Regex
  • Source you can read
  • About RunMat