spencermountain / compromise

modest natural-language processing

Home Page:http://compromise.cool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Throughout" within a main clause currently doesn't work.

ryancasburn-KAI opened this issue · comments

This is related to #1035.

m = m.ifNo('(despite|during|before|through|throughout)')

It's unclear to me what this list is based on. There are plenty of sentences which have through or throughout in the main clause.

Example: "She worked with the City to prepare detailed recommendations throughout downtown, including priorities on every street in Downtown and street cross sections for each street." -- Main clause should be the first one, with the subject being "She" and the verb being "worked." But because that clause has "throughout" it is rejected, making the verb show up as "including."

I asked chatGPT for an example where throughout would define a clause as subordinate, and it gave me this example: "Throughout the day, as the sun gradually set, the temperature dropped significantly, creating a chilly evening." The clause with throughout is already thrown out by the fact it doesn't have a verb from

Another chatGPT example: "The detective solved the case, unraveling the mystery throughout the entire investigation." -- Would still get the right answer without throwing out the second clause, because it would be the first clause at:

Are there any examples where the only way to tell a clause is subordinate is with "despite|during|before|through|throughout?"

Ah, just thought of an example this morning: “Despite Susan walking the dog, she was not wearing a coat.”

Is there a way to match the list in line 31 only if it is the start of the clause?

Is it as simple as:

m = m.ifNo('(^despite|^during|^before|^through|^throughout)') 

One more example to make it slightly more complex:
"Taking diligent notes throughout the entire class, the students remained focused during the lecture."

I believe this should be handled with m = m.ifNo('^#Gerund') I don't think clauses starting with a gerund can be a main clause.