## 3 Methodology
### Preprocessing Module
The example of dependency grammar in the sentence illustrated in Figure 2 can be defined as the set of \(V\) as follows: \(V=\{(WID\text{:1},\)\(DW\): \"The\", \(POS\): \"DT\", \(HW\_ID\): 2, \(HW\): \"waiter\"), (\(WID\): 2, \(DW\): \"waiter\", \(POS\): \"NN\", \(HW\_ID\): 4, \(HW\): \"attentive\"), \(\ldots\}\). \(E\) is a finite set of directed edges between nodes and is defined as the set of tuples,  
\[E= \{(WID:wid_{i},HW\_ID:hid_{j},DR:dr_{c})\mid\forall i=1\ldots n\] \[\text{ and }\forall j=1\ldots m\}\]  
(\(WID\): 4, \(DW\): \"roll\"), (\(WID\): 6, \(DW\): \"new\"), (\(WID\): 7, \(DW\): \"york\"), and (\(WID\): 8, \(DW\): \"city\")]. By using the _/CPW_TextBlob_ function, the set of \(V\) and \(NEx\) are associated and then mapped to \(CPW\) as follows: \(CPW=\{(WID\): {2,3,4}, \(NAT\): {\"spicy\", \"tuna\", \"roll\"}), (\(WID\): {6,7,8}, and \(NAT\): [\"new\", \"york\", \"city\")]. Regarding the example sentence depicted in Figure 2, the \(CPW\) is as follows: {(\(WID\): {2}, \(NAT\): [\"waiter\")], (\(WID\): {7}, \(NAT\): [\"food\"]), (\(WID\): {12}, \(NAT\): [\"views\"]), (\(WID\): {15}, and \(NAT\): [\"city\")]). In this example, no compound-named entities have been identified. However, many cases of complex multiple-word aspect terms may not be extracted by such tools. Examples of these include \"four seasons restaurant\", \"fish and chips\", and \"views of city\". To illustrate the solution for extracting these complex multiple-word aspect terms in some cases, this research proposes a portion of an algorithm, as described in Algorithm 2. In this algorithm, this research specifically targets multiple-word aspect terms that employ the prepositions \"of\" and \"with\", as well as the conjunction \"and\". The definitions of the variables used in Algorithm 2 are as follows:  
``` Input:\(DG\) is a finite set of tuples resulting from the dependency grammar. Output:\(MAT\) is a finite set of final aspect terms extracted from complex multiple-word aspect terms. Notations used:  Let \(CPW\leftarrow\)/\(CPW\_TextBlob\) be a finite set of compound words aggregated from \(V\) and \(NEx\) using the TextBlob function. Let \(PREP\) be a finite set of some prepositions, such as \"of\" and \"with\". Let \(CONI\) be a finite set of some conjunction, such as \"and\". Let \(NT\) be a finite set of noun POS tags. Procedure: \(MWT\leftarrow\emptyset,MW\leftarrow\emptyset\) \(NEx\leftarrow\)/\(IspectExtraction(V,NT)\) \(CPW\leftarrow\)/\(CPW\_TextBlob(V,NEx)\) \(DWR\leftarrow\)/\(DWR(DG,CPW)\) foreach\(dwr_{i}\in DWR\) if(\(dwr_{i}.SDR==\)\"amod\") then if(\(fCheckSentimentWord(dwr_{i}.DW))\)then\(remove(dwr_{i})\) endif else\(MWT\gets MWT\cup\{(MW:\{dwr_{i}.DW.append(dwr_{i}.HW)\})\}\) endif endforeachforeach\(mwt_{i}.MW\in MWT\) if(\(mwt_{i}.MW.include(a\in PREP\lor CONI)\)then\(MW=MW\cup mwt_{i}.MW.join(\"\(



**Definition 6**. : \(DWR\) _represents a finite set of dependent word relationships by associating each word in CPW with \(V\) and \(E\) defined in \(DG\), which has the dependency relation as an \(SDR\subset DR\). The \(SDR\) encompasses \"amod\", \"compound\", \"case\", \"nummod\", \"cc\", and \"nmod\"._

\[DWR= \{(DW:dw_{i},HW:hw_{j},SDR:dr_{c})\mid\forall i=1\ldots n,\] \[\forall j=1\ldots m\},\] \[dr_{c}\in(SDR\subset DR).\]

An example of dependent words relationship in the sentence illustrated in Figure 2 can be defined as the following set: \(DWR=\{(DW:\ ``good\",\ HW:\ ``views\",\ SDR:\ ``amod\"), (\(DW\): \"city\", \(HW\): \"views\", \(SDR\): \"nmod\"), and (\(DW\): \"of\", \(HW\): \"city\", \(SDR\): \"case\")]. For instance, in entry (\(DW\): \"good\", \(HW\): \"views\", \(SDR\): \"amod\"), it signifies that the word \"good\" serves as an adjectival modifier of the head word \"views\" with the dependency relation \"amod\". The entry (\(DW\): \"city\", \(HW\): \"views\", \(SDR\): \"nmod\") indicates that the word \"city\" acts as a nominal modifier of the head word \"views\" with the dependency relation \"nmod\".