In machine learning, semantic analysis of a corpus is the task of building structures that approximate concepts from a large set of documents.
Questions tagged [semantic-analysis]
137 questions
2
votes
1 answer
JavaCC Interpreter (AST to Symbol Table)
I'm getting quite confused about how I can create an javacc interpreter, particularly how to build a symbol table from an AST tree generated previously.
Something like this, from this AST:
> Program
> Id
> Id
> Id
> VarDecl
> Type
> Id
> …

soltex
- 2,993
- 1
- 18
- 29
2
votes
1 answer
Abstract Syntax Tree - Compiler Phases
The input of the semantic analyzer is the AST (asbtract syntax tree). My question is: the output of the semantic analyzer is the same AST decorated, or should be a new tree? What is the name of this tree? To create this new tree, Can I use visitor…

p.magalhaes
- 7,595
- 10
- 53
- 108
2
votes
1 answer
How to say if two articles about the same incident from different sources are the same using AI?
How can I say if two articles about the same incident but different grammatically and logically are same or different.
Example:
Case 1:
article 1 (news source 1): US trade deficit goes up this fiscal
article 2 (news source 2): US trade deficit on…

sathish
- 81
- 1
- 3
2
votes
2 answers
Rails Searching (Full text vs Semantic) for Food Products
I'm trying to build a search interface for a grocery store in Rails.
I have several grocery store products stored in my database, but I'm struggling to find a good way to search through them.
So far, I've used Thinking Sphinx to do full text…

paniwani
- 659
- 3
- 9
- 18
1
vote
2 answers
compilers - Instruction Selection for type declarations in AST
I'm learning compilers and creating a code generator for a simple language that deals with two types: characters and integers.
After the user input has been scanned by the scanner and then parsed by the parser, I get an AST representation of the…

ddriver1
- 723
- 10
- 18
1
vote
1 answer
Frameworks for semantic annotation for user defined domain model
I have some documents and an ontology for some concepts. Are there any frameworks that automatically extracts those concepts from the given documents and creates triples? The ontology must contain special properties?
I found UIMA, but as far as I…

mihaela
- 219
- 3
- 16
1
vote
2 answers
What is the best way in Java to parse semantic data from a source?
I would like to read and parse a marked up text (probably microformat, microdata, rdf or similar). Do I have create my own parser or is there any java library which can help with this?

user219882
- 15,274
- 23
- 93
- 138
1
vote
1 answer
Is it common to have two semantic analysis phases within compiler construction?
I've been studying the grammar and AST nodes for various languages with AST explorer.
With python, I've noticed that some form of semantic analysis is taking place during the parsing process. E.g.
x = 2
x = 2
Yields the following AST consisting of…

Tom
- 1,235
- 9
- 22
1
vote
1 answer
How to avoid ambiguity within symbol table lookups?
I have a rather rudimentary symbol table to map a identifier to a symbol, storing VariableSymbols, MethodSymbols, BuiltInTypeSymbols etc. This has worked fine for my simple interpreter. However now I want to implement more advanced symbol types such…

Tom
- 1,235
- 9
- 22
1
vote
1 answer
how to crawl semantically similar sentences
I want to create a corpus for a machine learning task. I have a small textual dataset and want to crawl similar sentences from web. I used sentence_transformers package with Bert pertained model, doc2vec and spacy similarity to measure similarity. I…

Laure
- 19
- 3
1
vote
0 answers
What constitutes semantic analysis apart from type checking?
I am writing a compiler from Java 1.0 to x86. I have built the Abstract Syntax Tree (using lex + yacc) and the symbol table. Now, in order to do semantic analysis I plan on traversing the AST in a Depth-first order , type-checking each syntactic…

Shashank Kumar
- 65
- 8
1
vote
2 answers
How to extract semantic relatedness from a text corpus
The goal is to assess semantic relatedness between terms in a large text corpus, e.g. 'police' and 'crime' should have a stronger semantic relatedness than 'police' and 'mountain' as they tend to co-occur in the same context.
The simplest approach…

Mulone
- 3,603
- 9
- 47
- 69
1
vote
3 answers
How do I find whether a document on the web is semantically related to some other document?
My question here is that given a document d1 on the web and a document d2 how do I tell that d1 and d2 are semantically related. Are there some API's that can do some amount of natural language processing that might give me a hint as to d1 is a…

station
- 6,715
- 14
- 55
- 89
1
vote
1 answer
i want to get a list of semantically similar words from the two embedded documents in python
I am working on text embedding in python. Where I found the similarity between two documents with the Doc2vec model. the code is as follows:
for doc_id in range(len(train_corpus)):
inferred_vector = model.infer_vector(train_corpus[doc_id].words)…

chirayu upadhyay
- 13
- 2
1
vote
1 answer
Semantic-based recommender Facebook application
As a project of this semester my friend and I are thinking to make a semantic-based recommender Facebook application. For example, if I wanted to go "a trip to Europe", this application is intended to do the following: go search in my friends list…

Zeina
- 29
- 2