“预建”潜在语义分析矩阵

发布于 2024-10-01 14:19:49 字数 326 浏览 3 评论 0原文

我想对我正在构建的小型应用程序使用潜在语义分析,但我不想自己构建矩阵。 (部分是因为我拥有的文档不会成为一个很好的培训集合,因为它们有点短且异构,部分是因为我刚买了一台新计算机,我发现安装线性代数之类的东西很麻烦我需要的库。)

是否有任何“默认”/预构建的 LSA 实现可用?例如,我正在寻找的内容包括:

  • 默认 U,S,V 矩阵(即,如果 D 是某个训练集中的术语文档矩阵,则 D = USV^T 是奇异值分解),因此给定任何查询向量 q,我都可以使用这些矩阵来计算 q 的 LSA 投影。
  • 一些黑盒 LSA 算法,给定查询向量 q,返回 q 的 LSA 投影。

I want to use Latent Semantic Analysis for a small app I'm building, but I don't want to build up the matrices myself. (Partly because the documents I have wouldn't make a very good training collection, because they're kinda short and heterogeneous, and partly because I just got a new computer and I'm finding it a bitch to install the linear algebra and such libraries I would need.)

Are there any "default"/pre-built LSA implementations available? For example, things I'm looking for include:

  • Default U,S,V matrices (i.e., if D is a term-document matrix from some training set, then D = U S V^T is the singular value decomposition), so that given any query vector q, I can use these matrices to compute the LSA projection of q myself.
  • Some black-box LSA algorithm that, given a query vector q, returns the LSA projection of q.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

留一抹残留的笑 2024-10-08 14:19:49

您可能对 Python 的 Gensim 框架感兴趣;值得注意的是,它有来自英语维基百科的构建适当矩阵的示例

You'd probably be interested in the Gensim framework for Python; notably, it has an example on building the appropriate matrices from English Wikipedia.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文