This entrypoint of the app is src/TextFormatter.js
npm install
npm run test
npm run generate-docs
TextFormatter.js is the main file of the application. It has a class named TestFormatter which has a function called format().
format function takes the input from module 1 and module 2 and returns the formatted text.
There are three classes that represent the Concepts extracted from the text:
- Entity
- Link
- Twitter Username
The Objects of these class are created via the TextItemFactory class which acts as a factory to produce various classes based on the item type. So if we need to add another Concept such as Hashtag, then we can create a new class and add it's instantiation logic in the TextItemFactory class.