<commit_before>package scala.com.ligadata.MetadataAPI

import java.io.File
import java.util.logging.Logger

import com.ligadata.MetadataAPI.{TestMetadataAPI, MetadataAPIImpl}
import com.ligadata.MetadataAPI.Utility._
import scala.io.Source



/**
 * Created by <NAME> on 7/24/15.
 */

object StartMetadataAPI {

  var response = ""
  //get default config
  val defaultConfig = sys.env("KAMANJA_HOME") + "/config/MetadataAPIConfig.properties"
  val loggerName = this.getClass.getName
  lazy val logger = Logger.getLogger(loggerName)
  var action = ""
  var location = ""
  var config = ""
  val WITHDEP = "dependsOn"
  val REMOVE = "remove"
  var expectDep = false
  var expectRemoveParm = false
  var depName: String = ""
  var parmName: String = ""

  def main(args: Array[String]) {
    try {
      var argsUntilParm = 2
      args.foreach( arg => {
         if (arg.endsWith(".json") || arg.endsWith(".xml") || arg.endsWith(".scala") || arg.endsWith(".java")) {
          location = arg
        } else if (arg.endsWith(".properties")) {
          config = arg
        } else {
          if (arg.equalsIgnoreCase(WITHDEP)) {
            expectDep = true
          }
          else if (expectDep) {
            depName = arg
            expectDep = false
          } else {
            if (arg.equalsIgnoreCase(REMOVE)) {
              expectRemoveParm = true
            } 
            
            if (expectRemoveParm) {
              argsUntilParm = argsUntilParm - 1
            }
              
            if (argsUntilParm < 0)<commit_msg>Added .jar to the list of extensions to parse for input files.<commit_after>package scala.com.ligadata.MetadataAPI

import java.io.File
import java.util.logging.Logger

import com.ligadata.MetadataAPI.{TestMetadataAPI, MetadataAPIImpl}
import com.ligadata.MetadataAPI.Utility._
import scala.io.Source



/**
 * Created by <NAME> on 7/24/15.
 */

object StartMetadataAPI {

  var response = ""
  //get default config
  val defaultConfig = sys.env("KAMANJA_HOME") + "/config/MetadataAPIConfig.properties"
  val loggerName = this.getClass.getName
  lazy val logger = Logger.getLogger(loggerName)
  var action = ""
  var location = ""
  var config = ""
  val WITHDEP = "dependsOn"
  val REMOVE = "remove"
  var expectDep = false
  var expectRemoveParm = false
  var depName: String = ""
  var parmName: String = ""

  def main(args: Array[String]) {
    try {
      var argsUntilParm = 2
      args.foreach( arg => {
         if (arg.endsWith(".json") || arg.endsWith(".xml") || arg.endsWith(".scala") || arg.endsWith(".java") || arg.endsWith(".jar")) {
          location = arg
        } else if (arg.endsWith(".properties")) {
          config = arg
        } else {
          if (arg.equalsIgnoreCase(WITHDEP)) {
            expectDep = true
          }
          else if (expectDep) {
            depName = arg
            expectDep = false
          } else {
            if (arg.equalsIgnoreCase(REMOVE)) {
              expectRemoveParm = true
            } 
            
            if (expectRemoveParm) {
              argsUntilParm = argsUntilParm - 1
            }
              
            if (argsUntilParm < 0)
{'fraction_non_alphanumeric': 0.1142316188071947, 'fraction_numerical': 0.0050489113284947935, 'mean_word_length': 2.12007874015748, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5530978', 'n_tokens_mistral': 959, 'n_tokens_neox': 935, 'n_words': 223}