This website demos the NLP model created from my artificial intelligence project class.
The model is trained on Stanford's Wikipedia Neutrality Corpus.
Find out more about the project here: https://aidenywl.github.io/neutbias/
- Obtain the extensions:
- Prettier: Code formatter, configured via
.prettierrc
- TSLint: TS linter, configured via
.tslint.json
- Stylelint: CSS linter, configured via
.stylelintrc
- PostCSS syntax: Enable postCSS syntax to use Javascript variables inside CSS files.
-
Update workspace's
settings.json
with this:"editor.formatOnSave": true,
-
Reload your editor
- Pull the repository
- Run
yarn
to install all packages. - Run
yarn start
and go to your browser to see the starting website.
- There are deployment scripts in
package.json
. - Simply run
yarn deploy
to deploy to github pages withgh-pages
.
This website extends the typescript react boilerplate I've written here.
- Typescript modules and all relevant react modules for development with typescript are installed.
- Webpack is configured to build and serve Typescript and CSS files.
- Babel is set up for ES6 syntax.
- CSS Loader and POSTCSS Loader is used to shift away from global css and localized css for each component.
- Further CSS set-up:
autoprefixer
andautoprefixer
normalizes styles for each browser and takes away the trouble of writing specific css classes for each browser - Redux Saga and Redux is used to abstract away the data layer and api calls.
Although Jest is set up, minimal tests have been written for this static page.
- Jest is set up and ready to go via
yarn test
. - React Testing Library is used to write tests instead of enzyme for flexibility and being able to better simulate the DOM as seen by a user.
- Using RTL allows us to move away from snapshot testing and test each component mocking components as required.
The backend is running on Flask on a GCP compute server serving the OpenNMT-py model trained on the corpus data.