Skip to content

Client Application

Andrei Sabau edited this page Sep 25, 2018 · 12 revisions

It represents the user interface of the "Backbone" application. The Backbone Application

The client application is composed of 2 files:

  • client_app.py: this file contains the following classes:

    • ClientApp - represents a controller of all other views.
    • MainView - this class represents a view used to access all the functionality of the application.
    • UploadFileView - this class represents a view used for uploading files, on the server, by the user. The user can upload the following file:
      • two input data sets (.csv files) - the first data set is mandatory, but the second one is optional.
      • configuration file
      • training file (optional)
      • settings file (optional)
    • RedirectOutputText - this class is used for redirecting the stdout to the 'text area' (ScrolledText) of the views
    • TrainingFileView - this class represents a view used for creating the training file. After the training file is created, it is sent automatically to the server.
    • ResultsView - this class is used for viewing the results queried from the database. You can choose to query results for companies by legal_name (name of the company) and thoroughfare (street address of the company).
  • console_label.py : this file contains one class:

    • ConsoleLabel - this class provides necessary functionalities for creating the training file. It outputs to the user a pair of companies and receives back an input from the user which represents the label of that pair, i.e., match or distinct. After that, the pair is assigned to an instance variable (labeled_examples). This variable is a dictionary where its keys are the labels:

      • match - the examples in the pair match (are about the same company)
      • distinct - the examples in the pair don't match (are about different companies)

      Also, this class creates the training file in the JSON format using the above mentioned instance variable

Notes

  • While the algorithm is running you cannot do other tasks in the application.
  • Creating the training file requires two tasks: sending a message to the server to create the uncertain_pairs file and getting this file from the server; they are done automatically by the app
  • The application provides the functionality of working with environment variables for getting the HTTP host. In case this environment variable is not specified, http://localhost:5000 will be used as the root URL.
Clone this wiki locally