You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
3
3
A Python port of [Phileas (Java)](https://github.com/philterd/phileas) — a library to deidentify and redact PII, PHI, and other sensitive information from text.
4
4
5
-
Check out the [documentation](https://philterd.github.io/phileas-python/) or details and code examples.
6
-
7
-
Built by [Philterd](https://www.philterd.ai).
5
+
*Check out the [documentation](https://philterd.github.io/phileas-python/) or details and code examples.
6
+
* Built by [Philterd](https://www.philterd.ai).
7
+
* Commercial support and consulting is available - [contact us](https://www.philterd.ai).
8
8
9
9
## Overview
10
10
@@ -504,7 +504,7 @@ pytest tests/ -v
504
504
505
505
## License
506
506
507
-
Copyright 2027 Philterd, LLC.
507
+
Copyright 2026 Philterd, LLC.
508
508
509
509
Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for details.
Copy file name to clipboardExpand all lines: docs/api-reference.md
+148Lines changed: 148 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,21 +8,56 @@ The main entry point for filtering text. `FilterService` is stateless; a single
8
8
9
9
```python
10
10
from phileas.services.filter_service import FilterService
11
+
from phileas.policy.policy import Policy
11
12
13
+
# Create with default in-memory context service
12
14
service = FilterService()
15
+
16
+
# Or provide a custom context service
17
+
from phileas.services.context_service import InMemoryContextService
18
+
ctx_svc = InMemoryContextService()
19
+
service = FilterService(context_service=ctx_svc)
13
20
```
14
21
22
+
### Constructor
23
+
24
+
```python
25
+
FilterService(context_service=None)
26
+
```
27
+
28
+
**Parameters**
29
+
30
+
| Parameter | Type | Default | Description |
31
+
|---|---|---|
32
+
|`context_service`|`AbstractContextService` or `None`|`None`| Context service implementation for managing referential integrity. If `None`, an `InMemoryContextService` is created automatically. |
33
+
15
34
### `filter(policy, context, document_id, text)`
16
35
17
36
Apply the policy to the given text and return a `FilterResult`.
18
37
19
38
```python
39
+
from phileas.services.filter_service import FilterService
0 commit comments