What is the difference between syntactic analogy and semantic analogy? - nlp

At 15:10 of this video about fastText it mentions syntactic analogy and semantic analogy. But I am not sure what the difference is between them.
Could anybody help explain the difference with examples?

Syntactic means syntax, as in tasks that have to do with the structure of the sentence, these include tree parsing, POS tagging, usually they need less context and a shallower understanding of world knowledge
Semantic tasks mean meaning related, a higher level of the language tree, these also typically involve a higher level understanding of the text and might involve tasks s.a. question answering, sentiment analysis, etc...
As for analogies, he is referring to the mathematical operator like properties exhibited by word embedding, in this context a syntactic analogy would be related to plurals, tense or gender, those sort of things, and semantic analogy would be word meaning relationships s.a. man + queen = king, etc... See for instance this article (and many others)

Related

Best lexicons for sentence vs document level analysis

What are the best lexicons for document-level and sentence-level analysis? I'm using Vader currently for sentence-level analysis, however I'm worried that when I move to the document level, Vader may not perform as well as others.
Similar question to the post here, however more specific.
In addition to the sentiment lexica listed in the linked post, I can recommend aFinn sentiment lexicon.
For sentiment analysis, depending on only lexica may not be be best solution, especially on document level. Language is so flexible that its attributes and notions other than sentiment-laden vocabulary effect semantics deeply.
Some of the core notions are contrastive discource markers (especially for document level), negation and modality.
contrastive discourse markers
There are opinions that have both pros and cons within documents and we tie those via those markers like 'however', 'nevertheless' etc. to convey meaning or an idea. For a bag of words approach, the sentences below are treated the same, yet if people to annotate their sentiment with one label, they may not annotate them with the same one:
The laptop has amazing features, but its screen is killing me.
The laptop's screen is killing me, but it has amazing features.
In general, we evaluate these kind of sentences or paragraphs with the sentiment of the subclause after 'but'. Other contastive discource markers have their own semantics as well. This is inspected in an area called discource analysis.
negation and modality
These notions change semantics as well. So, they cannot be overlooked for both levels. There are studies and papers those used negation and modality triggers with sentiment lexica. You can google it 'negation and modality on sentiment analysis' to see what you can do.
Finally what I can suggest is if you have a domain-specific dataset, you may build your own lexicon using distant supervision.
Hope this helps,
Cheers

What is the difference between semantic in nlp and semantic in ontology?

What is the difference between 'semantic' in nlp and 'semantic' in ontology accessed through an api such as jena??
As you can find from a quick search, semantics is
the branch of linguistics and logic concerned with meaning. The two main areas are logical semantics, concerned with matters such as sense and reference and presupposition and implication, and lexical semantics, concerned with the analysis of word meanings and relations between them.
This is the correct definition for NLP semantics. For Semantic Web, semantics is specifically the semantics of logical languages defined for the Semantic Web, i.e., RDF, RDFS, OWL (1 and 2). The main difference between the semantics of these languages and that of other languages (logical and not) is the restrictions that are applied to RDF/S and OWL (1/2) DL to make them machine understandable; this means that, in these languages, all implications can be made explicit in finite time.
You can find a lot of material on RDFS and OWL on the W3C pages:
http://www.w3.org/TR/owl2-overview/

Stanford NLP parsers and idioms that have common semantic meaning

I have parsed the following sentence in the Stanford CoreNLP demo page and the Stanford parser demo page. Although both result in a parse that can imply purpose semantics (hinging on the advcl and the sbar accordingly), clearly the parsers don't capture "in order to" as an expression whose meaning much transcends the relationships between its own word constituents (as in an idiom).
he went to the shop in order to buy food
What kind of parsing, or pre-processing stage, may yield "in order to" as a single unit of meaning, thus making it amenable to semantics derivation same as a preposition affords? e.g. "for" may commonly imply purpose semantics, and having "for" parse as a preposition assists in deriving purpose semantics.
As it currently stands, Stanford NLP does not allow this short of forking the code and fixing one nasty bug with your bare hands.

Are UML semantic variances necessary?

I am asking if it is necessary or useful to have semantic variances in UML. Would it not be more useful when it was more formal and therefore verifiable or even used for rapid prototyping. What is the benefit of the variance? Can you give some examples?
I would prefer to get rid of the semantic variation points of the UML. A typical example that causes confusion when I model diagrams is the multiple classification semantic variation point. When modeling generalizations in a class diagram, you can choose to assume that the diagram admits multiple classification (an object can be instance of two or more classes not related by a subtype relationship) or not.
Usually designers with a background programming implicitly assume that this is not possible while at the conceptual level many of us tend to implicitly assume that this is possible. You can imagine the result.

Different levels in speech recognition software

There are phonetic level, syntactic level, semantic level, phonological level, acoustic level,
linguistic level, language level.
Are there any other levels?
What's the order from the bottom up?
And what are they really about?
Language admits a lot of diversity, but it also obeys a lot of rules (though often loose ones, with tons of exceptions). So in a particular language, certain sounds are more likely to follow other sounds, certain words are more likely to follow others, and so on. The levels are basically the level of modeling.
Acoustic level is trying to determine which acoustic signals are useful for distinguishing human speech. It tries to answer questions like, "Is this background noise or a speech sound?"
Phonological level is based on what sounds are most likely to combine together when it is trying to reconstruct an acoustic signal into a sequence of phonemes. I think this is essentially the same as the phonetic level.
The language level determines what kind of accent the user has, the dialect, etc.
At the syntactic level, you're looking at which words are likely to appear together based on the syntax of the sentence. This gets rid of words that it would have guessed based on the phonological level but would construct ungrammatical sentences.
The linguistic level as I understand it is more a matter of picking the right word (for example, which homonym our versus hour) based on the context.
At the semantic level, it attempts to model the meaning of the sentence and get rid of things that don't conform to the grammatical relations of verbs and prepositions. For example, the verb disappear takes no direct object, so if there is something in that semantic slot, there probably is an error.
The order will depend on the application really, some of them may be collapsed into each other, some may not be used at all. A conceptual hierarchy that makes sense to me is acoustic < phonological = phonetic < language < syntactic < linguistic < semantic.

Resources