## 3 Methodology
### Knowledge Extraction
#### 3.2.1 Triplet Extraction  
For each document, we extract the relevant triplets using the open information extraction algorithm [39] that is included in the Stanford NLP package [38]. Before triplets are extracted, we identify and replace named entities using a named entity recognition algorithm (NIR) [40]. Example of entities that we replace are countries, cities, organizations, currency, and custom entities that are specific to the smart city subject. We also identify compound words, adjectives, adverbs, phrase modifiers existent in each sentence, and other triplets. For example, the sentence \"_The City of Philadelphia established SmartCityPHL in 2017 to better understand and implement smart technology solutions that would improve city service delivery_\" contains some instances that have to be replaced before triplets are extracted. In this sentence we find a compound word \"_City of Philadelphia_\" that will be replaced with \"_city_\". Also, \"_SmartCityPHL_\" is a customized instance and will be replaced with \"_initiative_\", while \"_2017_\" will be replaced with \"_year_\". The resulting sentence is \"_The City established initiative in year to better understand and implement smart technology solutions that would improve city service delivery_\". This sentence will be used as input for triplet extraction. Table 1 shows the resulting triplets that were extracted by the Stanford CoreNLP package from the sentence above. As seen from this table, there are six triplets that were extracted but the information in these triplets is repetitive. For example, there are only two distinct actions across the six triplets: \"understand\" and \"establish\". Considering this, triplets 3 and 4 are very similar and should be reduced. Second issue is the fact that some parts of the sentence did not generate triplets. For example, the \"_that would improve city service delivery_\" is not represented in the triplet list. Also, some parts of the generated triplets contain multiple words. The next phase of triplet extraction will focus on generating triplets that contain single words for each part. For each generated triplet that has multiple words in one of its parts we look into the dependency tree. For example, for the triplet 3, \"_City better understand smart technology solutions_\" the dependency tree is shown in Figure 2. By navigating each part of the triplet, we can reduce each triplet part to an atomic term. For example, the action \"_better understand_\", can be reduced to \"_understand_\", if we add another triplet with the subject \"_understand_\", the action \"_has property_\", and the object \"_better_\". Similarly, the object can be reduced to \"_solutions_\" while adding two more triplets: \"_solution have property smart_\" and \"_solution relate to technology_\". Further we look at conjunctions that we find in the text. For example, the terms \"_understand_\" and \"_implement_\" are connected by the conjunction \"_and_\". For each of the terms connected by a conjunction we will add a new triplet. One example of such new addition is triplet 2.3 (\"_city implement solution_\") in Table 2.  
The last step in triplet generation is to evaluate parts of the sentence that were not used in the triplets generated by Open IE algorithm. In this sentence, the part \"_that would improve city service delivery_\" was not included in any triplet generated by the Open IE algorithm. In such cases, we look for subject-object dependencies to generate new triplets. For example Figure 2 shows such a dependency for the verb \"_improve_\" with the subject \"_solution_\" and the object \"_delivery_\". This triplet will be added to the list of triplets and it is