#1 Download computer science & engineering books free           #2 Display your sponsored posts here. Reach 10,000+ students. Contact: info[at]cpentalk.com for quote           #3 Take the Ultimate Trivia Quiz. See where you rank globally.
+2 votes
in Artificial Intelligence by (user.guest)

Outline the major differences between Java (or any other computer language with which you are familiar) and English, commenting on the “understanding” problem in each case. Think about such things as grammar, syntax, semantics, pragmatics, compositionality, context-dependence, lexical ambiguity, syntactic ambiguity, reference finding (including pronouns), background knowledge, and what it means to “understand” in the first place.

1 Answer

+1 vote
by (user.guest)
 
Best answer

Java is a true object-oriented programming language, whereas English is a natural/human understandable language. Programming languages like Java have strict mathematical definitions. This is in contrast with natural languages; they do not have a strict definition, but are used by a community of speakers.

The difference between Java and English-based languages on each case is stated as follows

A grammar is a finite set of rules that specifies a language. Formal languages always have an official grammar specified in manuals, whereas natural languages have no official grammar.

Syntax is the study of the principles and rules of constructing sentences in a natural language, whereas in programming language, syntax is the set of rules that defines the combinations of symbols that are considered to be syntactically correct programs in the language.

Both formal and natural languages associate a meaning or semantics to each valid string.

Pragmatics of a string is the actual meaning of the string, as it is spoken in a given situation. The meaning is not just in the words themselves, but also in the interpretation of the words. This is mainly associated with the English language rather than the programming language.

Compositionality allows sentence meanings to be expressed as some type of algebraic expression. This is used in both the English language and in programming languages like Java.

Lexical ambiguity: In Java, a symbol such as “Aug” can be lexically ambiguous as it could refer to a variable, a class, or a function. The ambiguity can be rescued simply by checking the declaration. Therefore, declarations fulfill, in a very exact way, the role played by background knowledge and grammatical content in English. Whereas English has much lexical ambiguity.

Syntactic ambiguity: In Java, the syntax of language resolves ambiguity. English has much syntactic ambiguity.

Reference: In Java, there is a program, “this”, to refer an object on which a method was invoked. Other than that, there are no pronouns or other means of indexical reference. In English, there are many techniques for reference.

Background knowledge: With Java, none is needed to interpret a program because a local “context” is built up as declarations are procured. In English, much is needed to allow disambiguation.

Understanding: In Java, understanding a program means translating it to JVM by coding. In English, understanding an utterance means responding to it appropriately.

Related questions

Welcome to CPEN Talk
Solution-oriented students of computer engineering on one platform to get you that

ONE SOLUTION

Chuck Norris doesn't need sudo, he just types "Chuck Norris" before his commands.
...