deepset-ai / COVID-QA

API & Webapp to answer questions about COVID-19. Using NLP (Question Answering) and trusted data sources.
Apache License 2.0
344 stars 121 forks source link

Adapter pattern applied to autocomplete.py #165

Open SarruSharma opened 3 years ago

SarruSharma commented 3 years ago

In this implementation, the structural design pattern, adapter was applied to the file autocomplete.py in order to offer flexibility to future developments of the search bar. Through the adapter (AskAdapter) and adaptee (Target) class, string sources can now be easily checked and communicated with through different interfaces.