"(A dog) bit (my friend)." "(My friend) bit (a dog)." Both parse as "(compound subject) verb (compound object)." Both "my" and "a" function as adjectives modifying the single noun after them.
The sentences have identical parse trees, even when considering the types of the nodes. They are grammatically identical.
They are not identical. They are similar at this production step:
S -> subj verb obj
The verb is common: verb -> ... -> bit
So we have the same overall sentence pattern with the same verb, in the same tense.Other than that, the derivation diverges:
subj -> ... -> a dog
subj -> ... -> my friend
You can't just ignore substructure differences and symbol identities in comparing trees!Of course, any two things are the same, if you choose to ignore anything that is different and define "sameness" that way.
This isn't conveniently bending definitions to make myself sound correct. This is the specific technical definition that was worked out by linguists in their empirical examination of language (and later adopted by computer scientists because it happens to work nicely with programming languages too). It might not match with some colloquial uses, but it's a reasonable assumption that an article discussing linguistics would be using the precise linguistic definition.
I get the point of the example, but it seems different at the grammatical level too.
Subject/object should be at a different level above grammar.
There are animals that have demonstrated some "semantics". There are parrots that do better than Koko with spoken language, but still do not produce anything like the grammatical constructs humans do. Everything I've seen out of parrots could be covered by memorizing a handful of grammar constructs in a very brute-force manner, and they have no deliberate ability to combine them.
The core point is that to distinguish '"A dog bit my friend" and "My friend bit a dog."' requires grammar, which so far as I know as one who tends to pay attention to these things, is not a thing that animals have ever demonstrated a deep understanding of (if there are animals that could distinguish that, that is probably their maximum limit) and certainly never demonstrated production of. (Or, at the very least, we've never decoded and proved is speech, if you're thinking of whales and dolphins and such.) If you produce and understand speech as the Koko sentence above, you can't distinguish those two sentences. It's not about whether changing subject and object makes a "different sentence" by some metric, it's about whether the animal in question has a well-defined usage of subject and object as distinct grammatical categories at all.
For example, in my sentence "The cup wants Koko" I used earlier, it is invalid, yet everyone here reading it has at the very least the same understanding of why it is invalid, because what it says and the grammar of why it says that is completely clear to us.
† An operation mapping a set X onto another X' by relating every member of X with some member of X', so that X' has the same number of members as X, but the identity of the members may be different.
In other languages, differentiating between subject/object is done differently. example: "A doggo bit my friendee" or "My friendo bit a dogee" and you can see the difference. Word order is still somewhat relevant here because I didn't add endings to the verb too, which is commonplace in such languages. When you do that you are able to be far more free with word position:
My Friendee doggo bitto. Bitto My friendee doggo.
In this way it's easier to tell the subject/object difference.[1] To some degree this can be done in English and is exactly what Yoda does: "My friend a dog bit" but that sentence can be either of the ones you gave. Adding a comma may help "My friend, a dog bit" = "A dog bit my friend"
[1] This is exactly what Latin does and as rjf72 mentioned it gives more freedom. Many Latin authors put the verb at the end which gives you a sort of suspense as to just what is happening. In my second example I put the verb up front and the subject at the end which allows me to keep you in suspense as to who did the biting.
Grammars make sense of sequences of symbols, i.e. order matters.
Only if you claim there is no difference between "dog" and "friend" can you claim that the two sentences are indistinguishable. But that's why they are different words -- so you can tell them apart :)
Am I missing something here? Those two sentences are absolutely distinguishable grammatically - in one of the them the subject is "a dog" and the object is "my friend" and in the other the subject is "my friend" and the object is "a dog".
I realize this is kind of nitpick, but at the very least this is a very bad example to use to demonstrate the importance of this PFS concept.