// Path: indexer/ai/src/main/java/com/google/cloudsearch/exceptions/InvalidConfigException.java
// public class InvalidConfigException extends Exception {
//         public InvalidConfigException(String e){
//             super(e);
//         }
// }


import com.google.cloud.language.v1.*;
import com.google.cloudsearch.exceptions.InvalidConfigException;
import com.google.common.collect.Multimap;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import java.util.concurrent.TimeUnit;
import org.apache.log4j.Logger;
package com.google.cloudsearch.ai;


/**
 * Class StandardSkillCategoryExtraction implements the methods required for
 * invoking Natural Language API's Category extraction and populating the
 * structured Data for CloudSearch.
 */
class StandardSkillCategoryExtraction extends BaseAISkill {

    private String inputLanguage = "";
    private double categoryConfidence = 0.0;
    LanguageServiceClient languageService;
    private Logger log = Logger.getLogger(StandardSkillCategoryExtraction.class.getName());

    /**
     * Constructor
     * @param aiSkill   The JSON Object in Configuration containing Category Extraction skill
     *                  related information.
     * @param schema    The CloudSearch Schema.
     * @throws InvalidConfigException
     */
// Path: indexer/ai/src/main/java/com/google/cloudsearch/exceptions/InvalidConfigException.java
// public class InvalidConfigException extends Exception {
//         public InvalidConfigException(String e){
//             super(e);
//         }
// }


// Path: indexer/ai/src/main/java/com/google/cloudsearch/ai/StandardSkillCategoryExtraction.java
import com.google.cloud.language.v1.*;
import com.google.cloudsearch.exceptions.InvalidConfigException;
import com.google.common.collect.Multimap;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import java.util.concurrent.TimeUnit;
import org.apache.log4j.Logger;

package com.google.cloudsearch.ai;


/**
 * Class StandardSkillCategoryExtraction implements the methods required for
 * invoking Natural Language API's Category extraction and populating the
 * structured Data for CloudSearch.
 */
class StandardSkillCategoryExtraction extends BaseAISkill {

    private String inputLanguage = "";
    private double categoryConfidence = 0.0;
    LanguageServiceClient languageService;
    private Logger log = Logger.getLogger(StandardSkillCategoryExtraction.class.getName());

    /**
     * Constructor
     * @param aiSkill   The JSON Object in Configuration containing Category Extraction skill
     *                  related information.
     * @param schema    The CloudSearch Schema.
     * @throws InvalidConfigException
     */
    public StandardSkillCategoryExtraction(JSONObject aiSkill, JSONObject schema) throws InvalidConfigException {