salesforce / TabularSemanticParsing

Translating natural language questions to a structured query language
https://arxiv.org/abs/2012.12627
BSD 3-Clause "New" or "Revised" License
222 stars 51 forks source link

Matchfirst not iterable during data processing #24

Closed elaruwan closed 3 years ago

elaruwan commented 3 years ago

Hello,

When preprocessing the data via ./experiment-bridge.sh configs/bridge/spider-bridge-bert-large.sh --process_data 0

I found this error - as TypeError: argument of type 'MatchFirst' is not iterable

This comes from moz_sp/formatting.py as it attempts to check the incoming identifier against the set of RESERVED names, however as these are infact pyparsing objects, they aren't iterable. I tries this via 'identifier not in RESERVED'. https://pythonhosted.org/pyparsing/pyparsing.MatchFirst-class.html

It appears that 'not RESERVED.searchString(identifier)' may solve this issue?

I'm using python 3.8 pyparsing==2.4.7

todpole3 commented 3 years ago

@elaruwan It could be a difference between python3.7 and 3.8. In our experiments we used Python 3.7.

elaruwan commented 3 years ago

Ah,

Thats likely!

Will close

On Fri, 2 Apr 2021 at 12:53, Victoria X Lin @.***> wrote:

@elaruwan https://github.com/elaruwan It could be a difference between python3.7 and 3.8. In our experiments we used Python 3.7.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/salesforce/TabularSemanticParsing/issues/24#issuecomment-812237277, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQMNQETUSDASX35WMZRL5RDTGUBONANCNFSM42HSEZOA .

elaruwan commented 3 years ago

Thanks!