---
# System prepended metadata

title: 'CSE 549 Project: Ukkonen''s Suffix Tree Implementation'

---

# CSE 549 Project: Ukkonen's Suffix Tree Implementation

## Archieve Contents:
1) Memory calculation files
    i)  **$memory\_calc\_ukkonens.py$** contains code for calculation of memory used by the algorithm. This generates memory_profiler.py which contains memory used for each test case.
    ii) memory_read.py is used to calculate and plot memory utilized. This file reads data from memory_profiler.py
    
2) We generated **$input\_for\_st.txt$** file which contains data generated for testing of the algorithm. This file contains ~4500 samples of more than 27000 length texts. Data can be downloaded from https://drive.google.com/file/d/1UuVoaaIOq2Fzdn-LFLP2C4BJPaol1tjz/view?usp=sharing

3) **$ukkonens.py$** contains our main code. To run the code follow the step given below.

4) **$ukkonens.py$** also contains code for cpu utilization metrics generation.

## Steps to run the code
- The python code of Ukknonen's algorithm implementation is in file **$ukkonens.py$**
- There are 3 options to run the code[Need to select an option from it]:
    -    **1 - Text Input** : Here the user need to input their own string, suffixes and suffix tree are printed on screen.
    -    **2 - Default Test Cases** : A list of default testacases are hardcoded in the python code for which suffix trees and suffixes will be printed.
    -    **3 - Runtime** : For this option to run the user should have a file "input_for_st.txt" in the same directory, it contains line-separated texts.
        -    The output is generated in "runtime.csv" which contains "TextLength, CPU Time, Loop Counter, and RAM Usage" for all texts.
    
    
