Skip to content

Commit

Permalink
Deployed 201ce14 with MkDocs version: 1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jzonthemtn committed Oct 23, 2024
1 parent cda7d7c commit 2c1defd
Show file tree
Hide file tree
Showing 16 changed files with 88 additions and 90 deletions.
10 changes: 5 additions & 5 deletions api_and_sdks/api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1478,15 +1478,15 @@


<h1 id="api">API</h1>
<p>Philter's API is divided into three parts, the <a href="filtering-api.md">Filtering API</a> the <a href="policies-api.md">Policies API</a>, and the <a href="alerts-api.md">Alerts API</a>.</p>
<p>Philter's API is divided into three parts, the <a href="filtering_api/">Filtering API</a> the <a href="policies_api/">Policies API</a>, and the <a href="alerts_api/">Alerts API</a>.</p>
<ul>
<li><a href="filtering-api.md">Filtering API</a> - The filtering API is used to redact text. With the filtering API, you can send text or PDF documents to Philter and receive back the redacted text or PDF document.</li>
<li><a href="policies-api.md">Policies API</a> - The policies API allows you to create, modify, and delete <a href="policies_README.md">policies</a>. Policies can also be created manually with access to Philter, but the API provides a programmatic way to manage policies.</li>
<li><a href="alerts-api.md">Alerts API</a> - The alerts API allows you to get and delete <a href="alerts.md">alerts</a> that were generated during redaction.</li>
<li><a href="filtering_api/">Filtering API</a> - The filtering API is used to redact text. With the filtering API, you can send text or PDF documents to Philter and receive back the redacted text or PDF document.</li>
<li><a href="policies_api/">Policies API</a> - The policies API allows you to create, modify, and delete <a href="../../policies/filter_policies/">policies</a>. Policies can also be created manually with access to Philter, but the API provides a programmatic way to manage policies.</li>
<li><a href="alerts_api/">Alerts API</a> - The alerts API allows you to get and delete <a href="../../other_features/alerts/">alerts</a> that were generated during redaction.</li>
</ul>
<p>The Philter <a href="../sdks/">SDKs</a> provide convenient methods for using Philter's API methods for various programming languages.</p>
<h2 id="securing-philters-api">Securing Philter's API</h2>
<p>Philter's API supports one-way and two-way SSL/TLS authentication. See the <a href="settings.md#ssl-tls">SSL/TLS</a> settings for more information.</p>
<p>Philter's API supports one-way and two-way SSL/TLS authentication. See the <a href="../../settings/">settings</a> for more information.</p>



Expand Down
8 changes: 4 additions & 4 deletions api_and_sdks/sdks/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1422,11 +1422,11 @@


<h1 id="client-sdks">Client SDKs</h1>
<p>Philter SDKs are available for use in your projects. The SDKs are licensed under the <a href="https://github.com/mtnfog/philter-sdks/blob/master/LICENSE">Apache License, version 2.0</a>. Refer to the GitHub projects below for your language of choice for usage examples.</p>
<p>Philter SDKs are available for use in your projects. The SDKs are licensed under the Apache License, version 2.0]. Refer to the GitHub projects below for your language of choice for usage examples.</p>
<ul>
<li><a href="https://github.com/mtnfog/philter-sdk-java">Java</a></li>
<li><a href="https://github.com/mtnfog/philter-sdk-net">.NET</a></li>
<li><a href="https://github.com/mtnfog/philter-sdk-golang">Go</a></li>
<li><a href="https://github.com/philterd/philter-sdk-java">Java</a></li>
<li><a href="https://github.com/philterd/philter-sdk-net">.NET</a></li>
<li><a href="https://github.com/philterd/philter-sdk-golang">Go</a></li>
</ul>


Expand Down
58 changes: 29 additions & 29 deletions evaluating-performance/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@



<title>How to Evaluate Phileas' Performance - Philter</title>
<title>How to Evaluate Philter'ss Performance - Philter</title>



Expand Down Expand Up @@ -82,7 +82,7 @@
<div data-md-component="skip">


<a href="#how-to-evaluate-phileas-performance" class="md-skip">
<a href="#how-to-evaluate-philterss-performance" class="md-skip">
Skip to content
</a>

Expand Down Expand Up @@ -117,7 +117,7 @@
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">

How to Evaluate Phileas' Performance
How to Evaluate Philter'ss Performance

</span>
</div>
Expand Down Expand Up @@ -1417,9 +1417,9 @@
</li>

<li class="md-nav__item">
<a href="#configuring-phileas" class="md-nav__link">
<a href="#configuring-philter" class="md-nav__link">
<span class="md-ellipsis">
Configuring Phileas
Configuring Philter
</span>
</a>

Expand Down Expand Up @@ -1502,33 +1502,33 @@



<h1 id="how-to-evaluate-phileas-performance">How to Evaluate Phileas' Performance</h1>
<p>A common question we receive is how well does Phileas perform? Our answer to this question is probably less than satisfactory because it simply depends. What does it depend on? Phileas' performance is heavily dependent upon your individual data. Sharing to compare metrics of Phileas' performance between different customer datasets is like comparing apples and oranges.</p>
<p>If your data is not exactly like another customer's data then the metrics will not be applicable to your data. In terms of the classic information retrieval metrics precision and recall, comparing these values between customers can give false impressions about Phileas' performance, both good and bad.</p>
<h1 id="how-to-evaluate-philterss-performance">How to Evaluate Philter'ss Performance</h1>
<p>A common question we receive is how well does Philter perform? Our answer to this question is probably less than satisfactory because it simply depends. What does it depend on? Philter's performance is heavily dependent upon your individual data. Sharing to compare metrics of Philter's performance between different customer datasets is like comparing apples and oranges.</p>
<p>If your data is not exactly like another customer's data then the metrics will not be applicable to your data. In terms of the classic information retrieval metrics precision and recall, comparing these values between customers can give false impressions about Philter's performance, both good and bad.</p>
<blockquote>
<p>This guide walks you through how to evaluate Phileas' performance. If you are just getting started with Phileas please see the Quick Starts instead. Then you can come back here to learn how to evaluate Phileas' performance.</p>
<p>This guide walks you through how to evaluate Philter's performance. If you are just getting started with Philter please see the Quick Starts instead. Then you can come back here to learn how to evaluate Philter'ss performance.</p>
</blockquote>
<h2 id="guide-to-evaluating-performance">Guide to Evaluating Performance</h2>
<p>We have created this guide to help guide you in evaluating Phileas' performance on your data. The guide involves determining the types of sensitive information you want to redact, configuring those filters, optimizing the configuration, and then capturing the performance metrics.</p>
<p>We have created this guide to help guide you in evaluating Philter's performance on your data. The guide involves determining the types of sensitive information you want to redact, configuring those filters, optimizing the configuration, and then capturing the performance metrics.</p>
<blockquote>
<p>If you are using Philter we will gladly perform these steps for you and provide you a detailed Phileas performance report generated from your data. Please contact us to start the process.</p>
<p>If you are using Philter we will gladly perform these steps for you and provide you a detailed Philter performance report generated from your data. Please contact us to start the process.</p>
</blockquote>
<h4 id="what-you-need">What You Need</h4>
<p>To evaluate Phileas' performance you need:</p>
<p>To evaluate Philter's performance you need:</p>
<ul>
<li>An application using Phileas.</li>
<li>An application using Philter.</li>
<li>A list of the types of sensitive information you want to redact.</li>
<li>A data set representative of the text you will be redacting using Phileas. It's important the data set be representative so the evaluation results will transfer to the actual data redaction.</li>
<li>A data set representative of the text you will be redacting using Philter. It's important the data set be representative so the evaluation results will transfer to the actual data redaction.</li>
<li>The same data set but with annotated sensitive information. These annotations will be used to calculate the precision and recall metrics.</li>
</ul>
<h4 id="configuring-phileas">Configuring Phileas</h4>
<p>Before we can begin our evaluation we need to create a policy. A <a href="policies_README.md">policy</a> is a file that defines the types of sensitive information that will be redacted and how it will be redacted. The policies are stored on the Phileas instance under <code>/opt/Phileas/policies</code>. You can edit the policies directly there using a text editor or you can use Phileas' <a href="policies-api.md">API</a> to upload a policy. In this case we recommend just using a text editor on the Phileas instance to create a policy.</p>
<h4 id="configuring-philter">Configuring Philter</h4>
<p>Before we can begin our evaluation we need to create a policy. A <a href="../policies/filter_policies/">policy</a> is a file that defines the types of sensitive information that will be redacted and how it will be redacted. The policies are stored on the Philter instance under <code>/opt/Philter/policies</code>. You can edit the policies directly there using a text editor or you can use Philter's <a href="policies-api.md">API</a> to upload a policy. In this case we recommend just using a text editor on the Philter instance to create a policy.</p>
<p>When using a text editor to create and edit a policy, be sure to save the policy often. Frequent saving can make editing a policy easier.</p>
<p>We also recommend considering to place your policy directory under source control to have a history and change log of your policies.</p>
<h4 id="creating-a-policy">Creating a Policy</h4>
<p>Make a copy of the default policy, and we will modify the copy for our needs.</p>
<p><code>cp /opt/Phileas/policies/default.json /opt/Phileas/policies/evaluation.json</code></p>
<p>Now open <code>/opt/Phileas/policies/evaluation.json</code> in a text editor. (The content of <code>evaluation.json</code> will be similar to what's shown below but may have minor differences between different versions of Phileas.)</p>
<p><code>cp /opt/Philter/policies/default.json /opt/Philter/policies/evaluation.json</code></p>
<p>Now open <code>/opt/Philter/policies/evaluation.json</code> in a text editor. (The content of <code>evaluation.json</code> will be similar to what's shown below but may have minor differences between different versions of Philter.)</p>
<pre><code>{
&quot;name&quot;: &quot;default&quot;,
&quot;identifiers&quot;: {
Expand All @@ -1555,10 +1555,10 @@ <h4 id="creating-a-policy">Creating a Policy</h4>
<h4 id="identifying-the-filters-you-need">Identifying the Filters You Need</h4>
<p>The rest of the file contains the filters that are enabled in the default policy. We need to make sure that each type of sensitive information that you want to redact is represented by a filter in this file. Look through the rest of the policy and determine which filters are listed that you do not need and also which filters you do need that are not listed.</p>
<h4 id="disabling-filters-we-do-not-need">Disabling Filters We Do Not Need</h4>
<p>If a filter is listed in the policy and you do not need the filter you have two options. You can either delete those lines from the policy and save the file, or you can set the filter's <code>enabled</code> property to false. Using the <code>enabled</code> property allows you to keep the filter configuration in the policy in case it is needed later but both options have the same effect.</p>
<p>If a filter is listed in the policy, and you do not need the filter you have two options. You can either delete those lines from the policy and save the file, or you can set the filter's <code>enabled</code> property to false. Using the <code>enabled</code> property allows you to keep the filter configuration in the policy in case it is needed later but both options have the same effect.</p>
<h4 id="enabling-filters-not-in-the-default-policy">Enabling Filters Not in the Default Policy</h4>
<p>Let's say you want to redact bitcoin addresses. The bitcoin address filter is not in the default policy. To add the bitcoin address filter we will refer to Phileas' documentation on the bitcoin address filter, get the configuration, and copy it into the policy.</p>
<p>From the <a href="bitcoin-addresses.md">bitcoin address filter documentation</a> we see the configuration for the bitcoin address filter is:</p>
<p>Let's say you want to redact bitcoin addresses. The bitcoin address filter is not in the default policy. To add the bitcoin address filter we will refer to Philter's documentation on the bitcoin address filter, get the configuration, and copy it into the policy.</p>
<p>From the <a href="../policies/filters/common_filters/bitcoin-addresses/">bitcoin address filter documentation</a> we see the configuration for the bitcoin address filter is:</p>
<pre><code> &quot;bitcoinAddress&quot;: {
&quot;bitcoinAddressFilterStrategies&quot;: [
{
Expand Down Expand Up @@ -1601,29 +1601,29 @@ <h4 id="enabling-filters-not-in-the-default-policy">Enabling Filters Not in the
</code></pre>
<p>The order of the filters in the policy does not matter and has no impact on performance. We typically place the filters in the policy alphabetically just to improve readability.</p>
<p>Repeat these steps until you have added a filter for each of the types of sensitive information you want to redact. Typically, the default redaction <code>strategy</code> and <code>redactionFormat</code> values for each filter should be fine for evaluation.</p>
<p>When finished modifying the policy, save the file and close the text editor. Now restart Phileas for the policy changes to be loaded:</p>
<pre><code>sudo systemctl restart Phileas
<p>When finished modifying the policy, save the file and close the text editor. Now restart Philter for the policy changes to be loaded:</p>
<pre><code>sudo systemctl restart Philter
</code></pre>
<h4 id="submitting-text-for-redaction">Submitting Text for Redaction</h4>
<p>With our policy in place we can now send text to Phileas for redaction using that policy:</p>
<pre><code>PhileasConfiguration phileasConfiguration = ConfigFactory.create(PhileasConfiguration.class);
<p>With our policy in place we can now send text to Philter for redaction using that policy:</p>
<pre><code>PhilterConfiguration PhilterConfiguration = ConfigFactory.create(PhilterConfiguration.class);

FilterService filterService = new PhileasFilterService(phileasConfiguration);
FilterService filterService = new PhilterFilterService(PhilterConfiguration);

FilterResponse response = filterService.filter(policies, context, documentId, body, MimeType.TEXT_PLAIN);
</code></pre>
<p>The <code>explain</code> API <a href="filtering-api.md#explain">endpoint</a> produces a detailed description of the redaction. The response will include a list of spans that contain the start and stop positions of redacted text and the type of sensitive information that was redacted. Using this information we can compare the redacted information to our annotated file to calculate precision and recall metrics.</p>
<p>The <code>explain</code> API <a href="../api_and_sdks/api/filtering_api/">endpoint</a> produces a detailed description of the redaction. The response will include a list of spans that contain the start and stop positions of redacted text and the type of sensitive information that was redacted. Using this information we can compare the redacted information to our annotated file to calculate precision and recall metrics.</p>
<h4 id="calculating-precision-and-recall">Calculating Precision and Recall</h4>
<p>Now we can calculate the precision and recall metrics.</p>
<ul>
<li>Precision is the number of true positives divided by the number true positives plus false positives.</li>
<li>Recall is the number of true positives divided by the number of false negatives plus true positives.</li>
</ul>
<p><img alt="Calculating the precision and recall" src="Images/precision.png" /></p>
<p><img alt="Calculating the precision and recall" src="../img/precision.png" /></p>
<ul>
<li>The F-1 score is the harmonic mean of precision and recall.</li>
</ul>
<p><img alt="Calculating the F-1 score" src="Images/f1.png" /></p>
<p><img alt="Calculating the F-1 score" src="../img/f1.png" /></p>



Expand Down
3 changes: 1 addition & 2 deletions howtos/evaluate_performance/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1655,8 +1655,7 @@ <h1 id="how-to-evaluate-philters-performance">How to Evaluate Philter's Performa
<p>A common question we receive is how well does Philter perform? Our answer to this question is probably less than satisfactory because it simply depends. What does it depend on? Philter's performance is heavily dependent upon your individual data. Sharing to compare metrics of Philter's performance between different customer datasets is like comparing apples and oranges.</p>
<p>If your data is not exactly like another customer's data then the metrics will not be applicable to your data. In terms of the classic information retrieval metrics precision and recall, comparing these values between customers can give false impressions about Philter's performance, both good and bad.</p>
<blockquote>
<p>This guide walks you through how to evaluate Philter's performance. If you are just getting started with Philter please see the Quick Starts instead. Then you can come back here to learn how to evaluate Philter's performance.
{style="warning"}</p>
<p>This guide walks you through how to evaluate Philter's performance. If you are just getting started with Philter please see the Quick Starts instead. Then you can come back here to learn how to evaluate Philter's performance.</p>
</blockquote>
<h2 id="guide-to-evaluating-performance">Guide to Evaluating Performance</h2>
<p>We have created this guide to help guide you in evaluating Philter's performance on your data. The guide involves determining the types of sensitive information you want to redact, configuring those filters, optimizing the configuration, and then capturing the performance metrics.</p>
Expand Down
Loading

0 comments on commit 2c1defd

Please sign in to comment.