小编Lel*_*don的帖子

NLTK 单字词性标注

考虑到不同的单词可能有同音异义词,有没有办法使用 NLTK 来获取单个字母字符串的一组可能的词性?

例如:report -> {Noun, Verb} , kind -> {Adjective, Noun}

我一直无法找到一个 POS-tokenizer 来标记完整句子上下文之外的词的词性。这似乎是 NLTK 的一个非常基本的要求,所以我很困惑为什么我很难找到它。

nltk part-of-speech

2
推荐指数
1
解决办法
2573
查看次数

form_with 在应该重定向时不重定向

我正在为一个我认为非常简单的错误而苦苦挣扎,但我没有 Rails 的复杂性来检测该错误的位置。

我有以下表格:

<%= form_with(url: '/bills/viewer', method: :get) do |f| %>

  <%= f.label :congress, 'Congress (i.e. 112)' %>
  <%= f.number_field :congress, class: 'form-control' %>

  <%= f.label :bill_type, 'Bill type' %>
  <%= f.radio_button :bill_type, 'hr' %><%= ' House of Representatives' %>
  <%= f.radio_button :bill_type, 's' %><%= ' Senate' %>
  <%= f.radio_button :bill_type, 'hjres' %> <%= 'House Joint Resolution' %>
  <%= f.radio_button :bill_type, 'sjres' %><%= ' Senate Joint Resolution' %>
  <%= f.radio_button :bill_type, 'hconres' %><%= ' House Concurrent Resolution' %>
  <%= …
Run Code Online (Sandbox Code Playgroud)

forms ruby-on-rails

1
推荐指数
1
解决办法
998
查看次数

标签 统计

forms ×1

nltk ×1

part-of-speech ×1

ruby-on-rails ×1