2
$\begingroup$

I just read about Parse Tree for parsing a sentence as an Input for NLP Task.

In my understanding, a valid Parse Tree of a sentence should have be validated by linguistic expert. So, I concluded, a sentence only has one Parse Tree structure.

But, is that correct? is it possible a sentence has more than one valid structures of parse tree with the same type (e.g. Constituency-based)?

$\endgroup$
2
$\begingroup$

But, is that correct? is it possible a sentence has more than one valid structures of parse tree with the same type (e.g. Constituency-based)?

The fact that a single sequence of words can be parsed in different ways depending on context (or "grounding") is a common basis of miscommunication, misunderstanding, innuendo and jokes.

One classic NLP-related "joke" (around longer than modern AI and NLP) is:

Time flies like an arrow.

Fruit flies like a banana.

There are actually several valid parse trees for even these simple sentences. Which ones come "naturally" will depend on context - anecdotally I only half got the joke when I was younger, because I did not know there were such things as fruit flies, so I was partly confused by literal (but still validly parsed, and somewhat funny) meaning that all fruit can fly about as well as a banana does.

Analysing these kinds of ambiguous sentences leads to the grounding problem - the fact that without some referent for symbols, a grammar is devoid of meaning, even if you know the rules and can construct valid sequences. For instance, the above joke works partly because the nature of time, when referred in a particular way (singular noun, not as a possession or property of another object), leads to a well-known metaphorical reading of the first sentence.

A statistical ML parser could get both sentences correct through training on many relevant examples (or trivially by including the examples themselves with correct parse trees). This has not solved the grounding problem, but may be of practical use for any machine required to handle natural language input and map it to some task.

I did check a while ago though, and most Parts Of Speech taggers in Pythons NLTK get both sentences wrong - I suspect because resolving sentences like those above and AI "getting language jokes" is not a high priority compared to more practical uses for chatbots/summarisers etc.

$\endgroup$
1
$\begingroup$

Grammars in NLP basically correspond to Context-free Grammars(CFG) in formal Language theory. And, in case the CFG corresponding to the NLP task is ambiguous, then corresponding to a single sentence (more formally derivation), there can be multiple Parse Trees.
Hence, it depends on the grammar whether there can be more than one valid parse tree.

$\endgroup$
1
$\begingroup$

Natural language processing began with a twentieth century view of linguistics and more specifically grammar. It is no longer believed by many linguists today that natural language forms a tree. That does not mean that parsing is invalid or that a tree structure can't be employed at all. What it means is that the way teachers used to force students to fit strict rules was not and may never be followed by people at parties, bloggers online, writers of technical documents, poets, or Pulitzer Prize winners.

Language is not only dynamic in terms of the order and interrelationships between linguistic elements, but also across geographies and across time. That is why NLP is so difficult to comprehend and program. One must discard rules.

There are times when what is in dictionaries as a noun describes an action like a verb or modifies another noun, therefore acting as an adjective. There are times when what is in dictionaries as a verb describes a type of object like a noun or modifies another verb, therefore acting like an adverb. If done frequently enough, the other part of speech will begin to appear in dictionaries, which must ultimately adapt to changing language. All attempts to pin down language in time have failed throughout history, and all attempts to develop relational mappings based on word proximity and order have failed.

In summary, language is amorphous, colloquial, and in constant flux based on trends in media, social intercourse, and technology.

The flexible and comprehensive (and therefore correct) way to represent sound and text is a sequence of linguistic elements. The elements may be shorter than a word, like "re-" or "-ing", or they may be longer than a word, such as all word compositions before they become hyphenated and then single words like, "be hinde" --> "be-hind" --> "behind". A more recent example is "data set" --> "data-set" --> "dataset".

Now consider data structures to support your sentence.

I just read about Parse Tree for parsing a sentence as an Input for NLP Task.

Parse Tree could be thought of as an adjective modifying a noun, but you capitalized it because you think of "Parse Tree" as a linguistic element cognitively, whether or not you are cognoscente of that coupling, otherwise the sentence would have been.

I just read about a tree for parsing a sentence as an Input for NLP Task.

NLP has become a single entity cognitively as well, thus the popularity of the acronym, which no longer means processing that happens to work on language which happens to be natural. If those ideas were separate, then the obviousness that a tree does not really model the nature of the sentence we are using as an example. First of all, tree nodes can only have one parent and the word, "Input," relates to both the task and the sentence. So does the word, "Read." In fact, a directed graph representing the relationships between linguistic elements for this sentence will have multiple incoming edges for several vertices and there will also be cycles, so it is not even acyclic.

Parsing is still one way to develop a directed graph representation of the phrase and begin to develop a semantic mapping of the cognitive content expressed. It is not the only way and is not likely the way the human brain does it. A tree may be involved in processing, but probably a spanning tree across the directed graph. Again, that's probably not the way the human brain does it.

Another aspect of NLP to consider is that, if a linguistic expert is required to validate any part of the process, it is not artificial intelligence. Such would be semi-automated natural language processing, which would not be of much commercial or even research value.

There is little doubt that the language capabilities of the human brain use structures of the same type. People who learn two or three languages have an easier time learning the next one. This is a strong indication that language processing, cognition, and the formulation of responses are language independent. Thus a single type of phrase to semantic conversion occurs using similar structure of linguistic elements and similar structures of cognition. There may not be complete language independent overlap, but at least partial. We see this as some pairs of bilingual people will switch between languages in the same phrase with grace, as if it was easier to express something with two languages than it would have been if one was chosen.

Surely, a phrase has more than one structure to represent it. The likelihood that a person hearing a phrase and repeating it back has the same understanding of the phrase as the original speaker or the same association strengths and semantic relationships either. The culture of the speaker and the listener or the writer and the reader depends on complex and extensive conceptual consensus or at least near consensus for comprehension to result during dialog.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.