# Linked Data Triples Enhance Document Relevance Classification
## 3 Natural Language Features
### Linked Data (Triples)  
Triples (or linked data) are generally of the form _subject-predicate-object_ triples and multiple triples can be extracted from every complete sentence in a document. As a document contains a set of sentences, each document generates a set of triples. Triples from a sentence [33] can be extracted by syntactic parsers, such as OpenNLP ([[https://opennlp.apache.org/](https://opennlp.apache.org/)]([https://opennlp.apache.org/](https://opennlp.apache.org/)), accessed on 8 March 2021), Stanford parser [34], Link Parser([[https://www.link.cs.cmu.edu/link/](https://www.link.cs.cmu.edu/link/)]([https://www.link.cs.cmu.edu/link/](https://www.link.cs.cmu.edu/link/)), accessed on 8 March 2021), and Minipar [35]. All of these systems generate similar outputs; however, their extraction algorithms may differ. In the Stanford Parser, for instance, each sentence is given as input, and the parser produces a syntactical Treebank-style [34] output. A Treebank defines the syntactical structure of a sentence. A sentence \(S\) occupies the top of the tree as its root node. A sentence is split into three children--Noun Phrase (NP), Verb-Phrase (VP), and full stop. The last child, full-stop, does not contain any useful information but serves simply to syntactically separate sentences. The other two phrases have part-of-speech tags on each word.  
Triple extraction proceeds in three phases: finding the subject, the predicate, and the object of the sentences from the NPs and VPs. To find the subject, a breadth-first search algorithm is implemented over the NPs to identify the first noun in the phrase. Nouns are usually tagged as NN (Common noun), NNP (Singular proper noun), NNPS (Plural, proper noun), and NNS (Plural common noun). To determine the predicate, a search function is conducted on the VPs, and the deepest verb is extracted and considered. Verbs are tagged as VB (base verb), VBD (past tense verb), VBG (present participle verb), VBN (past participle verb), VBP (present tense first person singular), and VBZ (third person singular). Lastly, objects can also be fetched from VPs but should be searched in three sub-phrases--NPs, Adjective-Phrases (ADJPs), and Prepositional-Phrases (PPs). Nouns are searched in NPs and PPs for object extraction, while adjectives in ADJPs are considered as attributes of the object. JJs (ordinal adjectives) and JJRs (comparative adjectives) are tags that belong to ADJPs.  
For instance, consider a simple sentence in a document that reads _\"U.S. scientists call for fight against climate change\"_. \"U.S. scientists\"_ is the noun phrase, hence being considered the subject. In VP, _\"call\"_ being the only verb is tagged as the predicate. This sentence has two noun phrases, hence forming two objects _\"fight\"_ and _\"climate change\"_. The words _\"for\"_ and _\"against\"_ in the sentence are adjective phrases (ADJP), considered as attributes to the object. The two extracted linked data triples corresponding to the utterance _\"U.S. scientists call for fight against climate change\"_ would be \(<\)U.S. scientists, call, for fight\(>\) and \(<\)U.S. scientists, call, for climate change\(>\).