# Deep Semantic Parsing with Upper Ontologies
## 4 Integration of PropBank, FrameNet and WordNet
There are several FrameNet parsers available as open source projects, but the project team was able to compile, test and integrate with other components of our system only the SEMAFOR [19] parser. However, it found that SEMAFOR did not meet the recall and precision requirements for our project. For example, SEMAFOR could  
not parse the word \"was\" (the verb _\"be\"_ is not defined in FrameNet) in all sentences of the book and could not identify _\"[PERSON]\"_ as the \"Agent\" for the predicate _\"seated\"_. In most research projects, the problem of frame semantic parsing is modeled in two stages: frame identification and argument identification. In FrameNet, frame identification is simply the disambiguation of frame words. For example, the verb _\"stood\"_ in the second sentence in Figure 1 has five frames (_Posture_; _Placing_; _Change_posture_; _Being_located_; _Occupy_rank_;), and the FrameNet parser must decide which one to choose. The second stage is more difficult than the first one, because in the argument identification process one must take into account all possible phrases in the sentence and all possible role labels in the frame. The novelty of this paper lies in both stages: the proposal to use BERT embeddings at the frames' identification stage and the PropBank augmentation statistical model in the argument identification stage. The following describes an algorithm that uses BERT contextual attachments as inputs and gives a probability distribution for possible semantic frames. Contextual word embedding is a distributed representation of semantics, in which each word is represented as a vector in \(R^{m}\). For example, consider our example sentence _\"1 **stood** upon the hearth-rug and... \"_. Table 2 shows some statistics for the verb _\"stood\"_ in the FrameNet corpus. It is possible to represent the context of _\"stood\"_ as a 1024-dimensional vector using a language representation model called Bidirectional Encoder Representations from Transformers (we use BERT\({}_{\text{LARGE}}\) (_L = 24_, _H = 1024_, _A = 16_)) [20]. The first stage in our algorithms: for all 237,161 sentences in the FrameNet corpus the system extracts 1024-dimensional vectors for each word that targets the frame, and these vectors are stored in the database for late use in the inference stage. During the inference process (see Figure 6), the new predicate verb is mapped to the same 1024-dimensional space using BERT\({}_{\text{LARGE}}\). The process then selects and loads all the vectors from the FrameNet sample database, where each sample sentence has the same verb as our new verb. If we continue with our example sentence _\"1 **stood** upon the hearth-rug and... \"_, then it means that the system loads all \(10+2+8+14+85=119\) vectors for five frames, as is shown in Table 2. At the last stage, the system uses the k-nearest neighbors algorithm to classify our new verb. These 119 vectors serve as training examples for k-NN. An important note needs to be made to explain how the system chooses the parameter k in the k-NN algorithm. It always chooses k using the following simple steps: (1) it selects all frames that are triggered by the new verb (five frames in Table 2 in our example for the verb \"_stood_\"); (2) then, from the selected frames it chooses the frame with the least number of samples, and marks this number of samples as m (this will be the frame _Change_posture_ with a sample size of two, i.e., m = 2); (3) our parameter k will be \(k=m\). The following describes the argument identification model that is used in frame-semantic parsing. It is assumed that the system already disambiguated the frame predicate (e.g., <Posture> in Figure 6 for the word _\"stood\"_). The novelty of this method lies in the fact that it is simple, but at the same time provides state-of-art accuracy. The standard approach to identifying roles is to start by selecting a set of semantic roles from the frame lexicon and supplement it with a null role. Then it is necessary to consider a set of intervals that can potentially fulfill a semantic role.