IsIdentifiable 0.5.0

dotnet add package IsIdentifiable --version 0.5.0
                    
NuGet\Install-Package IsIdentifiable -Version 0.5.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="IsIdentifiable" Version="0.5.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IsIdentifiable" Version="0.5.0" />
                    
Directory.Packages.props
<PackageReference Include="IsIdentifiable" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add IsIdentifiable --version 0.5.0
                    
#r "nuget: IsIdentifiable, 0.5.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=IsIdentifiable&version=0.5.0
                    
Install IsIdentifiable as a Cake Addin
#tool nuget:?package=IsIdentifiable&version=0.5.0
                    
Install IsIdentifiable as a Cake Tool

.NET Core Total alerts NuGet Badge codecov

Supports reading from MongoDb, Sql Server, MySql, PostgreSql, DICOM and CSV files

IsIdentifiable

A tool for detecting identifiable information in data sources. Out of the box supports:

  • CSV
  • DICOM
  • Relational Database Tables (Sql Server, MySql, Postgres, Oracle)
  • MongoDb

Demo Video

Rules base is driven by regular expressions and plugin services (e.g. Natural Language Processing). Also includes a reviewer/redactor tool for processing false positives and updating the rules base.

There is a standalone command line tool called ii for running directly or you can use the nuget package in your own code to evaluate data.

Library Usage

To use the nuget package create a new project and add a reference to the package:

dotnet new console -n MyExample
cd MyExample
dotnet add package IsIdentifiable

Open Program.cs and enter the following:

using IsIdentifiable.Options;
using IsIdentifiable.Reporting;
using IsIdentifiable.Reporting.Reports;
using IsIdentifiable.Runners;
using System;

// Where to put the output, in this case just to memory
var dest = new ToMemoryFailureReport();

// Your runner that fetches and validates data
var runner = new CustomRunner(dest);

// fetch and analyise data
runner.Run();

Console.WriteLine("Failures:" + dest.Failures.Count);
Console.WriteLine("Bad Parts:" + dest.Failures[0].Parts.Count);
Console.WriteLine("Bad Part 0:" + dest.Failures[0].Parts[0].Word);
Console.WriteLine("Bad Part 1:" + dest.Failures[0].Parts[1].Word);

class CustomRunner : IsIdentifiableAbstractRunner
{
    public CustomRunner(IFailureReport report) :base(new IsIdentifiableBaseOptions(),report)
    {
    }

    public override int Run()
    {
        var field = "SomeText";
        var content = "Patient DoB is 2Mar he is my best buddy. CHI number is 0101010101";

        // validate some example data we might have fetched
        var badParts = Validate(field,content);

        // You can ignore or adjust these badParts if you want before passing to destination reports
        if(badParts.Any())
        {
            var f = new Failure(badParts)
            {
                ProblemField = field,
                ProblemValue = content,
            };

            // Pass all parts as a Failure to the destination reports
            AddToReports(f);
        }

        // Record progress
        DoneRows(1);

        // Once all data is finished being fetched, close the destination reports
        CloseReports();

        return 0;
    }
}

Run your csproj with dotnet run and you should see the following

$> dotnet run
Failures:1
Bad Parts:2
Bad Part 0:2Mar
Bad Part 1:0101010101

Building

To build and run tests you must first download the NLP english data file for Tesseract to the data\tessdata\ directory. Or use the following script:

 cd .\data\tessdata\

 # Windows
 ./download.ps1

 # Linux
 . ./download.sh

Then build and run (from the root of the repository)

dotnet build
dotnet test
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.5.0 193 6 days ago
0.4.0 5,199 9 months ago
0.3.0 2,714 1/19/2024
0.2.1 463 1/8/2024
0.2.0 234 1/7/2024
0.1.0 4,155 4/13/2023
0.0.9 2,403 11/21/2022
0.0.8 829 11/5/2022
0.0.7 1,326 8/24/2022
0.0.6 541 8/17/2022
0.0.5 1,069 7/20/2022
0.0.4 2,716 3/3/2022
0.0.3 757 3/1/2022
0.0.2 718 2/10/2022
0.0.1 702 2/7/2022