Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

Conversation

@SwithinTan
Copy link

@SwithinTan SwithinTan commented Apr 15, 2021

LanguageDetector class in the file detect_language.py is split into three parts according to its methods, then we apply the Bridge design pattern to reorganize the function structure and main() method to instantiate the object and output our customized result.
Benefits: Decouple the abstraction and implementation parts. The implementation is also changed dynamically at run time and the extensibility of abstraction and implementation is improved. If we want to change the detecting marks or change the output format we can modify those classes directly.

@SwithinTan SwithinTan changed the title PR2 PR_2_Structural_Design_Pattern(Bridge_Pattern) Apr 15, 2021
@SwithinTan SwithinTan closed this Apr 20, 2021
@SwithinTan SwithinTan deleted the PR2 branch April 20, 2021 13:30
@SwithinTan SwithinTan restored the PR2 branch April 20, 2021 13:32
@SwithinTan SwithinTan reopened this Apr 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant