I've been working on a second language development project. I need to calculate the t-unit of a given sentence using Python. For example, for the following sentences:
The man did not like water.
1 t-unit (The man did not like water)
The man did not like water although he lived by the sea.
1 t-unit (The man did not like water although he lived by the sea)
The man never liked water and he certainly did not like living in the swamp with her grandparents.
1 t-unit (The man never liked water) 1 t-unit (he certainly did not like living in the swamp with her grandparents)
The man did not like water or juice.
1 t-unit (The man did not like water or juice)
I've checked out nltk, spacy and stanford nlp (stanza) but found out that they don't include such t-unit detection at all.
I've come across this but it is about clause extraction.
Any idea how I can detect such t-units using Python?