Table of contents

Analyze data with Watson Explorer

You can analyze the data in a collection with the Watson™ Explorer Content Miner or via the Python API in a Jupyter noteboow.

You can analyze the data in a collection with the Watson Explorer Content Miner. To do this, open the Watson Explorer collections in a project, confirm that indexing has finished, and then click the collection. you can now analyze the collection as described in Mining content . keep in the mind the differences described in Watson Explorer oneWEX tasks.

You can also access the collection via the Python API in a Jupyter notebook as shown below.

  1. Create or open a notebook.
  2. Click Find and Add Data (Finad and add data) in the toolbar, and then select the Other tab.
  3. You can insert the code to access the collection or to extract features.
    insert code

    Here is an example of inserted code to get the exploration interface.

    # import wex library
     import ibmwex
     # Create a client instance
     api_client = ibmwex.ApiClient()
     # Get exploration interface
     api_exploration = ibmwex.ExplorationApi(api_client)
     # execute query and get results
     results_1 = api_exploration.query('ecbffdca-e1f2-c0ad-0000-0165131cedaa', '*:*')

    Here is an example of inserted code for feature extraction.

    #In earlier cells, there has to be insert code for WEX collection
     #Insert code for WEX feature extraction
     from ibmwex.ml import FeatureExtractor, OutputColumn
     extractor_1 = FeatureExtractor() \
     .setCollectionId('ecbffdca-e1f2-c0ad-0000-0165131cedaa') \
     .setInputCol("INPUT_COLUMN_NAME") \
     .setOutputCols([OutputColumn("words", "._word")])
  4. You can access the collection with the inserted code.