TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Superplurality

1 点作者 jaggirs超过 2 年前

1 comment

jaggirs超过 2 年前
I was programming today and I realized that there is a very common naming issue I encounter, which is that of naming variables that are &#x27;lists of lists of something&#x27;.<p>For example I might have an &#x27;embedding&#x27; object, which I put into a an &#x27;embeddings&#x27; list, which in turn I put into a another list, as illustrated by the pseudocode:<p><pre><code> embeddings_ = [] for X in Y: embeddings = [] for embedding in X: embeddings.append(embedding) embeddings_.append(embeddings) </code></pre> I wonder, what are your thoughts on naming such &#x27;superplural&#x27; entities? In the past I have sometimes used an underscore like in the example above, or another suffix like &#x27;_list&#x27;. The paper I link to has another suggestion: &#x27;embeddingses&#x27;. Other times we get lucky and there is actually a proper term for the &#x27;list of lists&#x27; objects, for example, a list of lists of pixels is an image [1].<p>[1] This analogy makes me realize that &#x27;superplurality&#x27; might also be seen as n-dimensionality, in the sense that a pixel is 0-d, a list of pixels is 1-d, an image is 2-d and, going further, a list of images (like a video) can be interpreted as 3-d.