<commit_before>{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "baseName": {
            "type": "string",
            "defaultValue": "[resourceGroup().name]",
            "metadata": {
                "description": "The base resource name."
            }
        },
        "tenantId": {
            "type": "string",
            "metadata": {
                "description": "The tenant ID to which the application and resources belong."
            }
        },
        "testApplicationId": {
            "type": "string",
            "metadata": {
                "description": "The application client ID used to run tests."
            }
        },
        "testApplicationSecret": {
            "type": "string",
            "metadata": {
                "description": "The application client secret used to run tests."
            }
        },
        "testApplicationOid": {
            "type": "string",
            "metadata": {
                "description": "The client OID to grant access to test resources."
            }
        },
        "location": {
            "type": "string",
            "defaultValue": "[resourceGroup().location]",
            "metadata": {
                "description": "The location of the resource. By default, this is the same as the resource group."
            }
        },
        "endpointPrefix": {
            "defaultValue": "textanalytics",
            "type": "string"
        }
    },
    "variables": {
        "uniqueSubDomainName": "[format('{0}-{1}', parameters('baseName'), parameters('endpointPrefix'))]"    
    },
    "resources": [
        {
            "type": "Microsoft.CognitiveServices/accounts",
            "apiVersion": "2017-04-18",
            "name": "[variables('uniqueSubDomainName')]",
            "location":"[parameters('location')]",
            "sku": {
                "name": "S0"
            },
            "kind": "TextAnalytics",
            "properties": {
                "customSubDomainName": "[variables('uniqueSubDomainName')]"
            }
        }
    ],
    "outputs": {
        "AZURE_TENANT_ID": {
            "type": "string",
            "value": "[parameters('tenantId')]"
        },
        "AZURE_CLIENT_ID": {
            "type": "string",
            "value": "[parameters('testApplicationId')]"
        },
        "AZURE_CLIENT_SECRET": {
            "type": "string",
            "value": "[parameters('testApplicationSecret')]"
        },
        "TEXT_ANALYTICS_SUBSCRIPTION_KEY": {
            "type": "string",
            "value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts',variables('uniqueSubDomainName')), '2017-04-18').value[0].key1]"
        },
        "TEXT_ANALYTICS_ENDPOINT": {
            "type": "string",
            "value": "[variables('endpointValue')]"
        }
    }
}
<commit_msg>Fix ARM template for textanalytics (#9661)<commit_after>{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "baseName": {
            "type": "string",
            "defaultValue": "[resourceGroup().name]",
            "metadata": {
                "description": "The base resource name."
            }
        },
        "tenantId": {
            "type": "string",
            "metadata": {
                "description": "The tenant ID to which the application and resources belong."
            }
        },
        "testApplicationId": {
            "type": "string",
            "metadata": {
                "description": "The application client ID used to run tests."
            }
        },
        "testApplicationSecret": {
            "type": "string",
            "metadata": {
                "description": "The application client secret used to run tests."
            }
        },
        "testApplicationOid": {
            "type": "string",
            "metadata": {
                "description": "The client OID to grant access to test resources."
            }
        },
        "location": {
            "type": "string",
            "defaultValue": "[resourceGroup().location]",
            "metadata": {
                "description": "The location of the resource. By default, this is the same as the resource group."
            }
        },
        "endpointPrefix": {
            "defaultValue": "textanalytics",
            "type": "string"
        },
        "endpointSuffix": {
            "defaultValue": ".cognitiveservices.azure.com",
            "type": "string"
        }
    },
    "variables": {
        "uniqueSubDomainName": "[format('{0}-{1}', parameters('baseName'), parameters('endpointPrefix'))]",
        "endpointValue": "[format('https://{0}-{1}{2}', parameters('baseName'), parameters('endpointPrefix'), parameters('endpointSuffix'))]" 
    },
    "resources": [
        {
            "type": "Microsoft.CognitiveServices/accounts",
            "apiVersion": "2017-04-18",
            "name": "[variables('uniqueSubDomainName')]",
            "location":"[parameters('location')]",
            "sku": {
                "name": "S0"
            },
            "kind": "TextAnalytics",
            "properties": {
                "customSubDomainName": "[variables('uniqueSubDomainName')]"
            }
        }
    ],
    "outputs": {
        "AZURE_TENANT_ID": {
            "type": "string",
            "value": "[parameters('tenantId')]"
        },
        "AZURE_CLIENT_ID": {
            "type": "string",
            "value": "[parameters('testApplicationId')]"
        },
        "AZURE_CLIENT_SECRET": {
            "type": "string",
            "value": "[parameters('testApplicationSecret')]"
        },
        "TEXT_ANALYTICS_SUBSCRIPTION_KEY": {
            "type": "string",
            "value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts',variables('uniqueSubDomainName')), '2017-04-18').key1]"
        },
        "TEXT_ANALYTICS_ENDPOINT": {
            "type": "string",
            "value": "[variables('endpointValue')]"
        }
    }
}

{'fraction_non_alphanumeric': 0.16052376333656643, 'fraction_numerical': 0.011639185257032008, 'mean_word_length': 1.699389179755672, 'pattern_counts': {'":': 124, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '5921077', 'n_tokens_mistral': 1698, 'n_tokens_neox': 1627, 'n_words': 309}