Skip to content

Commit 488e362

Browse files
author
Halvani
committed
Updated README.md
1 parent 0b139ba commit 488e362

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,63 @@ Consider for example the following scenario: *D1* and *D2* represent two documen
1212
To prevent AA and AV methods from focusing on the topic and instead force them to concentrate on linguistic patterns such as function words or punctuation marks (which are closely related to writing style), topic masking approaches can be used, where POSNoise is one such approach...
1313

1414

15+
## Installation
16+
The easiest way to install POSNoise is to use pip, where you can choose between (1) the PyPI repository and (2) this repository.
17+
18+
- (1) ```pip install posnoise```
19+
20+
- (2) ```pip install git+https://github.com/Halvani/POSNoise.git ```
21+
22+
The latter will pull and install the latest commit from this repository as well as the required Python dependencies.
23+
24+
25+
## Quickstart
26+
```python
27+
import posnoise
28+
from posnoise import POSNoise
29+
30+
posnoise_instance = POSNoise(spacy_model_size=posnoise.core.SpacyModelSize.Large)
31+
32+
document = "I love python !"
33+
posnoised_doc = posnoise_instance.pos_noise(document)
34+
35+
print(document)
36+
print(posnoised_doc)
37+
38+
# I love python !
39+
# I Ø # !
40+
```
41+
42+
A detailed explanation of the **POS placeholders** (Ø, #, etc.) used in POSNoise can be found in Table 2 in the paper. Here, the arXiv version for open access: https://arxiv.org/abs/2005.06605
43+
44+
## Features
45+
- Effective way to mask topic-relatd content with **custom POS placeholders**
46+
- **Automatic NLP pipeline creation** (loads and installs the spaCy models on demand, while providing feedback)
47+
- **No API dependency** (after downloading the spaCy models, POSNoise can be used completely **offline**)
48+
- **Documented** source code
49+
50+
## Citation
51+
If you find this library helpful, please invest a few minutes and cite it in your paper/project:
52+
```bibtex
53+
@inproceedings{HalvaniGranerPOSNoise:2021,
54+
author = {Oren Halvani and Lukas Graner},
55+
editor = {Delphine Reinhardt and Tilo M{\"{u}}ller},
56+
title = {{POSNoise: An Effective Countermeasure Against Topic Biases in Authorship Analysis}},
57+
booktitle = {{ARES} 2021: The 16th International Conference on Availability, Reliability and Security, Vienna, Austria, August 17-20, 2021},
58+
pages = {47:1--47:12},
59+
publisher = {{ACM}},
60+
year = {2021},
61+
url = {https://doi.org/10.1145/3465481.3470050},
62+
doi = {10.1145/3465481.3470050},
63+
timestamp = {Sun, 04 Aug 2024 19:40:49 +0200},
64+
biburl = {https://dblp.org/rec/conf/IEEEares/HalvaniG21.bib},
65+
bibsource = {dblp computer science bibliography, https://dblp.org}
66+
}
67+
```
68+
69+
## License
70+
The POSNoise package is released under the Apache-2.0 license. See <a href="https://github.com/Halvani/posnoise/blob/main/LICENSE">LICENSE</a> for further details.
71+
72+
73+
## Last Remarks
74+
As is usual with open source projects, we developers do not earn any money with what we do, but are primarily interested in giving something back to the community with fun, passion and joy. Nevertheless, we would be very happy if you rewarded all the time that has gone into the project with just a small star 🤗

0 commit comments

Comments
 (0)