# Group Assignments for Project-Based Learning Using Natural Language Processing--A Feasibility Study
## 2 Materials and Methods
### NLP-Based Team Assignment  
The collected text proposals were clustered into similar ones in two steps, shown as a schematic in Figure 2. First, each proposal was encoded to a numerical representation in a vector space. For this encoding step, two widely used NLP algorithms were used, and corresponding numerical representations were compared for the same set of text proposals. Second, similarity was measured for each pair of numerical representations, and this similarity value was used to group similar proposals into a group. Distributions of the similarity measures using the two NLP algorithms and clustering results were compared.  
The first step is to encode each proposal into a numerical representation using either term frequency-inverse document frequency (TF-IDF) [20] or universal sentence embedding (USE) [21; 22]. For TF-IDF, each text was normalized, with nouns extracted using the open-source Korean text processor [24]. For processing Korean texts, it is a customary  
Figure 1: Histogram of proposal word counts.  
Figure 2: Schematic of the proposed method.  
preprocess step to use normalized nouns for efficiency and robustness [25; 26]. The number of unique nouns was 478. Thus, each text was represented by a 478-dimensional vector, where each element corresponded to the occurrence of each word. Specifically, TF-IDF signifies the product of the term frequency (TF) and inverse document frequency (IDF), defined as follows:  
\[\text{TF-IDF(t,d)}=\text{TF(t,d)}\;\text{IDF(t)IDF(t)}=\log\frac{1+\text{n}}{1+ \text{df(t)}}+1 \tag{1}\]  
Here, \(\text{TF(t,d)}\) is the term frequency of the given term (word) t in the document (text) d, n is the total number of texts, and \(\text{df(t)}\) is the number of documents (texts) that contain term (word) t. The resulting TF-IDF vectors were normalized using the Euclidean norm.  
With the USE representation, each text was encoded to a 512-dimensional vector using a deep neural network as follows. First, input texts were tokenized using SentencePiece [27]. Then, the encoder component of the transformer architecture [28] with bi-directional self-attention produced context-aware token representations. A pretrained model for this encoder was downloaded from the TF HUB [29], trained using the Stanford Natural Language Inference (SNLI) corpus [30], with question-answer and translation pairs mined from the Internet [21; 22]. Finally, these token representations were averaged to obtain a text-level representation for each text.  
The key difference between TF-IDF and USE is the use of the context information. TF-IDF is solely based on the frequency of each word. In contrast, the deep neural network used for USE is trained to take neighboring words into account. This difference would lead to qualitatively different numerical representations and grouping results.  
Using the vector representations obtained via either TF-IDF or USE, the similarity between a given text pair was calculated using the cosine similarity of their corresponding vector representations:  
\[S(v_{1},v_{2})=\frac{v_{1}\cdot v_{2}}{|v_{1}|\;|v_{2}|} \tag{2}\]  
where \(\cdot\) denotes the inner product of two vector representations (\(v_{1}\) and \(v_{2}\)) and \(|\;|\) represents the Euclidean norm. The similarity measures based on TF-IDF and USE are denoted as \(S_{\text{TF-IDF}}\) and \(S_{\text{USE}}\), respectively.  
Based on these similarity measures, texts were clustered into groups through agglomerative clustering [23]. Initially, each text forms a cluster; then, similar clusters are recursively merged.