## 3 Materials and Methods
By applying this technique, the most essential relations among the records are filtered out and various inferences are obtained. ```
Input: A list of relation records from the JSON file as D Output: A filtered resultant set S containing frequently occurring word patterns
1. Initialize an empty dictionary ED and an empty set ES
2. For each i in range (length (D)) 2.1 For each j in range (i + 1, length (D)) 2.1.1 Initialize an empty set IS 2.1.2 Find D[i] \(\cap\) D[j] and store the result in IS 2.1.3 If length (IS) > 0 then * Store D[i] and D[j] as a key/value pair in ED such that an object capable of holding various items is associated with each key as value * Put D[i] and D[j] as individual elements in ES
3. Initialize an empty set S
4. While ES is not empty 4.1 Find an element s with maximum co-occurrence value in ES 4.2 Add the element s to S 4.3 Find all the elements which on set intersection with s is not null from ED 4.4 Remove those elements and the element s from the set ES
5. Display the resultant set S
```

**Algorithm 4** TREASURE Relation Records Filtration based on Maximum Co-occurrence Value and Set Intersection

## 4 Results

### Data Preprocessing

Around eight drugs are analyzed with this model. For this purpose, abstracts from each document are collected, as they provide the accurate and necessary information about the paper. The PubMed abstracts have a unique ID called PMID. The metapub library in python gets these IDs as input and extracts their corresponding abstracts. The number of document abstracts collected for each drug from PubMed is given in Table 1.

The NLTK package in python is used to perform tokenization, stemming and to remove stop words. The tf-idf value is calculated for the words obtained and the minimum threshold is set around 0.03 to remove some unnecessary words. This threshold value is set after various trial and errors in the range 0.02 to 0.05. The results are then stored in a csv file such that each row corresponds to an abstract and each row contains the preprocessed words of that abstract. Similarly, eight different csv files are created. Figure 2 shows the word cloud representation of the preprocessed data obtained for eight different TB drugs. Among the preprocessed data, some words frequently occur than the other. The frequency of the word indicates its importance. Word clouds help to identify such words, as the size of each word in the cloud indicates its frequency of occurrence. Therefore, the preprocessed data are visualized in the form of a word cloud to identify such important words. \begin{table}
\begin{tabular}{c c} \hline \hline
**Name of the TB Drug** & **Number of Document Abstracts** \\ \hline Pyrazinamide & 1566 \\ Moxifloxacin & 1947 \\ Ethanolbud & 1841 \\ Isoniaid & 1896 \\ Rifampicin & 2209 \\ Linezolid & 1919 \\ Streptomycin & 1954 \\ Amikacin & 1909 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Number of documents collected from PubMed for each drug. Figure 2: Word clouds for TB drugs: (**a**) Amikacin, (**b**) Ethambutol, (**c**) Isoniazid, (**d**) Linezolid, (**e**) Moxifloxacin, (**f**) Pyrazinamide, (**g**) Rifampicin, (**h**) Streptomycin. ### Generation of Relation Records Using Affinity Analysis

This method is used to determine the relationship between the preprocessed data. Each document is considered as a transaction and each word in the document is considered as an item. The apyori library in python is used to perform the affinity analysis. The support, confidence and lift values are computed to determine various connections between the items. The frequently occurring trends among the data are identified. The minimum co-occurrence value (support) is set around 0.007 after various trials from 0.004 to 0.008 value range, the minimum conditional probability (confidence) is set as 0.5 after various trial and errors in the range 0.4 to 0.6 and the threshold for minimum number of items in the set is kept as 1 after various trials in the range of 1 to 3. The generated relation records are then stored in a JSON file.