Worksheetsdata mining
Total questions: 20
Worksheet time: 10mins
Which task is the primary goal when applying SBERT to web services in this context?
Generate embeddings for service descriptions
Train a web crawler for service discovery
Encrypt service endpoints for security
Schedule API calls for performance tests
Which Python library is most directly used to compute cosine similarity and perform dimensionality reduction like t-SNE or PCA?
scikit-learn for similarity and reduction
matplotlib for similarity and reduction
networkx for similarity and reduction
json for similarity and reduction
When loading service names from a text file, what simple preprocessing step is shown to prepare the data?
Strip lines and drop empties
Lowercase tokens only
Tokenize by whitespace
Serialize to JSON
You need to visualize a nearest-neighbor graph of services based on embedding similarity. Which combination of libraries fits this task best?
networkx with matplotlib
numpy with json
sentence-transformers alone
pandas with seaborn only
A file 'wslist.txt' contains service URLs with blank lines. Which concise Python snippet best loads non-empty, stripped lines into a list?
[line.strip() for line in f.readlines() if line.strip()]
f.read().split('\n\n') to skip blanks automatically
list(f).remove('') before stripping
json.load(f)['services'] expected in text
Which preprocessing step helps turn a service URL like http://example.com/MyService?wsdl into a cleaner label?
Removing query strings and special characters
Expanding abbreviations in the domain name
Translating the URL into natural language
Appending HTTP headers to the path
A pre-trained SBERT model converts service texts into what form for downstream analysis?
Dense semantic vectors
Bag-of-words counts
One-hot URL tokens
Sparse frequency matrices
In the workflow, why are embeddings and metadata saved to disk after computation?
To avoid recomputation in later runs
To reduce the embedding dimensionality
To anonymize all service labels
To improve model fine-tuning performance
Cosine similarity between service embeddings primarily measures which property?
Angular closeness in vector space
Euclidean distance along axes
Correlation of index positions
Shared tokens in raw text
Batch encoding with SBERT was used during embedding generation. What is the most direct benefit of batching here?
Improved throughput on available hardware
Higher accuracy of individual vectors
Automatic hyperparameter tuning
Reduced need for URL preprocessing
When projecting embeddings with t-SNE to two dimensions, what is the main goal of the projection?
Preserve local semantic neighborhoods
Maximize global variance explained
Align clusters with axis directions
Create linearly separable clusters
You have a 384-dimensional SBERT embedding matrix. To quickly sanity-check similar services, which sequence best uses available tools?
Compute cosine similarity, then inspect top-5 neighbors
Apply PCA to 2D, then compute Euclidean neighbors
Cluster with k-means, then recompute embeddings
Tokenize URLs, then compare Levenshtein distances
Which statement best describes 2D PCA in this workflow?
Projects embeddings to two axes for clustering
Sorts services by cosine distance magnitude
Creates a network layout using spring forces
Connects each node to top-K nearest neighbors
In the cosine similarity heatmap, what does a brighter cell typically indicate between two services?
Higher semantic similarity between embeddings
Greater Euclidean norm of both vectors
Larger top-K neighborhood overlap count
More nodes connected in the network graph
Which code snippet correctly generates the cosine similarity heatmap shown?
sim_matrix = cosine_similarity(service_embeddings[:N]); sns.heatmap(sim_matrix, cmap='viridis')
sim_matrix = pd.crosstab(services); plt.imshow(sim_matrix, 'viridis')
dist = pairwise_distances(services); sns.lineplot(dist, palette='viridis')
G = nx.Graph(service_embeddings); nx.draw(G, cmap='viridis')
When constructing a top-K nearest neighbor network, what do edges represent?
Connections to the K most similar services
Random links for spring_layout stability
Pairs with maximum cosine distances
Principal components from PCA axes
Which histogram would reveal how spread out services are in semantic space?
Histogram of pairwise cosine distances
Histogram of raw token frequencies
Histogram of PCA component variances
Histogram of graph node degrees
Which visualization is most appropriate to inspect global cluster structure in three dimensions?
3D PCA scatter of service embeddings
tally chart of nearest neighbor counts
heatmap of embedding norms per service
bar plot of K values across runs
Which sequence aligns with the summarized semantic analysis workflow?
Clean text, encode with SBERT, analyze neighbors and similarities
Run PCA first, scrape URLs, compute norms, then encode
Build network, compute heatmap, then obtain embeddings
Visualize t-SNE, fit SBERT, then remove duplicates
Why might networkx spring_layout be used after building the nearest-neighbor graph?
To position nodes for clear community visualization
To compute cosine similarities more efficiently
To normalize embedding magnitudes before plotting
To guarantee planar graphs with no crossings
