Questions tagged [semantics]

The study of meaning as it applies to programming languages

Semantics is the study of meaning. In computer programming, semantics refers to the relationships between symbols in a programming language, and how those symbols are combined and manipulated to produce a computing result.

Useful links

1728 questions
0
votes
0 answers

algorithm for sentence matching after calculating word similarity using nltk

Aim- User inputs a string. I need to compare this input with Sentence 1 and Sentence 2 and find the maximum similarity with either of these sentences. Current Approach- I tokenize the input and both sentences, find synonym sets of each token and…
naves
  • 349
  • 2
  • 10
0
votes
1 answer

How to resolve English sentence verbs semantically

I am trying to transform English statements into SQL queries. e.g. How many products were created last year? This should get transformed to select count(*) from products where manufacturing date between 1/1/2015 and 31/12/2015 I am not able to…
0
votes
0 answers

The semantics of Python

I need a clarification on the semantics of Python. Is it true that when Python encounters a statement of the form x = some_term a new object is being created, as specified by the process of evaluation of the term some_term? Now suppose that the…
Godot
  • 109
  • 1
0
votes
2 answers

Sum of city using group by country in sparql query

I want to calculate the total number of cities per country using a SPARQL query in Protege tool. The relation between city and country is that city isLocatedIn country. I tried this query that are given below but it fails. So kindly help…
User101
  • 55
  • 1
  • 10
0
votes
1 answer

Searching for semantic relatedness tool

I need a tool that compute the semantic relatedness between two words.Please, Have you an idea about a tool or a code source which adopts this process. I am trying wordnet similarity (http://maraca.d.umn.edu/cgi-bin/similarity/similarity.cgi), but…
Adem
  • 113
  • 1
  • 10
0
votes
1 answer

Python semantics and state

I'm writing some formal semantics for Python. Hopefully some Python guru's can help me out. As program execution moves down through a list of statements, each assignment statement (or expression) it encounters, it infers the type based on…
John Setter
  • 175
  • 1
  • 17
0
votes
1 answer

What is a valid, efficient, and modern way to not load images on mobile?

I've come across this multiple times now and always solved it with a combination of CSS and JS, but with increasing support for responsive images, I've been searching for a more eloquent solution. I'm simply trying to not load an image on mobile,…
Marcus McLean
  • 1,306
  • 2
  • 13
  • 24
0
votes
1 answer

How to seperate one RDF model into two models in Jena?

Now I have a RDF data, which contain two resources(I don't know whether it is correct to call the staff in rdf:description a resource), Now I want to separate the two resource into two rdf data in Jena, I do not know how to use the API to do it, The…
Pingjiang Li
  • 727
  • 1
  • 12
  • 27
0
votes
1 answer

How to find semantic orientation of an adjective using NLTK?

I am working on a project in which I need to find out the semantic orientation of an adjective i.e. whether the adjective is positive, negative or neutral using NLTK in python. For eg: If I have a sentence such as: "This Camera is awesome." So here…
akhil
  • 71
  • 1
  • 4
0
votes
1 answer

Semantic - CSS not working on mobile view

I'm using semantic-ui CSS making for responsive, but it is not working on mobile view, here is my class.
So there is something wrong?
0
votes
1 answer

How to compute similarity between two sentences (syntactical and semantical)

I'm supposed to take two sentences each time and compute if they are similar. By similar I mean, both syntactically and semantically. INPUT1: Obama signs the law. A new law is signed by Obama. INPUT2: A Bus is stopped here. …
Tinglin
  • 131
  • 2
  • 5
  • 15
0
votes
0 answers

Antlr4 semantic predicates to parse a date

I started here and here to come up with the following start, but I am getting the error: "Problems calling org.antlr.v4.gui.TestRig.main(args)". If someone could tell me where I am messing up I would appreciate it Form to parse : dd/mm/yyyy dd must…
0
votes
0 answers

Semantic search

I want to build an algorithm as follows - Lets say, user first search for keyword "tablet" and then again search for "Apple", so i should be able to populate 2nd search result which gives information on Apple tablet. Another example, first I search…
0
votes
1 answer

How does one get data from another service with the same ontology?

I'm trying to understand how ontology works. I've already read a lot of articles and posts in forums about ontology. I know what RDF and OWL are. But I can't understand how two ontologies are connected. For example I'm using FOAF ontology in my rdf…
Aivaras
  • 3
  • 2
0
votes
0 answers

How to get data property from dbpedia?

I am trying to use SPARQL to query data on Manchester United FC wikipedia page using dbpedia (which can be found here [http://dbpedia.org/page/Manchester_United_F.C.]). I have successfully accessed dbo and dbp properties but I can't seem to access…
umairaslam
  • 367
  • 3
  • 22