<commit_before>[![Build Status](https://travis-ci.org/manoharprabhu/PhoneNumberDirectory.svg)](https://travis-ci.org/manoharprabhu/PhoneNumberDirectory)

An implementation of Phone directory using Trie.
Very efficient for searching phone numbers with name prefix.

Usage:

Add a name,number pair using addEntry
    java
PhoneDirectory directory = new PhoneDirectoryTrie();
directory.addEntry("<NAME>","9182324432");
directory.addEntry("<NAME>","919923221234");

    
Remove a name,number pair using removeEntry
    java
directory.removeEntry("<NAME>");

    
Search all the entries beginning with a prefix using searchNameWithPrefix
    java
List<PhoneEntry> entries = directory.searchNameWithPrefix("Man");

    
The API currently returns the matches as a list of PhoneEntry (Name and Number)

List all entries in directory using listAllEntries
    java
List<PhoneEntry> entries = directory.listAllEntries();

    <commit_msg>Added more details to readme<commit_after>[![Build Status](https://travis-ci.org/manoharprabhu/PhoneNumberDirectory.svg)](https://travis-ci.org/manoharprabhu/PhoneNumberDirectory)

An implementation of Phone directory using Trie.
Very efficient for searching phone numbers with name prefix.

Usage:

Add a name,number pair using addEntry
```java
PhoneDirectory directory = new PhoneDirectoryTrie();
directory.addEntry("<NAME>","9182324432");
directory.addEntry("<NAME>","919923221234");
```

Remove a name,number pair using removeEntry
```java
directory.removeEntry("<NAME>");
```

Search all the entries beginning with a prefix using searchNameWithPrefix
```java
List<PhoneEntry> entries = directory.searchNameWithPrefix("Man");
The API currently returns the matches as a list of PhoneEntry (Name and Number)
```

List all entries in directory using listAllEntries
```java
List<PhoneEntry> entries = directory.listAllEntries();
```
{'fraction_non_alphanumeric': 0.10328133405056482, 'fraction_numerical': 0.023668639053254437, 'mean_word_length': 6.126436781609195, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '158060', 'n_tokens_mistral': 538, 'n_tokens_neox': 501, 'n_words': 162}