我目前正在研究临床NER标记应用程序(CliNER - 临床命名实体识别系统),我正在使用使用Keras / Tensorflow后端构建的双向LSTM来执行此任务。
我想知道是否有任何方法可以为输出添加条件。
<% @page_title = "Questionnaires" %>
<div class="Questionnaires index"
<h2>Questionnaires </h2>
<%= link_to("Add New questions", {:action => 'new'}, :class => 'action new') %><br>
<div><%= pluralize(@questionnaires.size, 'questionnaires') %> found</div>
<th>Questionnaires</th>
<table class="listing" summary="Questionnaires list">
<tr class="Header">
<th>Ques_id</th>
<th>Qname</th>
<th>Header</th>
<th>Description</th>
<th>Actions</th>
</tr>
<% @questionnaires.each do |objQuestionaire| %>
<tr class="<%= cycle('odd', 'even') %>">
<td><%= objQuestionaire.Ques_id %></td>
<td><%= objQuestionaire.Qname %></td>
<td><%= objQuestionaire.Header %></td>
<td><%= objQuestionaire.Description %></td>
<!--td><%= objQuestionaire.username %></td-->
<td class="actions">
<%= link_to("view", {:action => 'view', :id => objQuestionaire.id}, :class => 'action view') %>
<!-- <%= link_to("view", '#', :class => 'action view') %>-->
<!-- <%= link_to("Edit", '#', :class => 'action edit') %>-->
<%= link_to("edit", {:action => 'view', :id => objQuestionaire.id}, :class => 'action edit') %>
</td>
<%end %>
##its my error page
Showing /home/cabox/workspace/app_1/app/views/questionnaires/index.html.erb where line #20 raised:
undefined method `Ques_id' for #<Questionnaires:0x007fcc490c88f8>
Extracted source (around line #20):
17
18
19
20
21
22
23
<% @questionnaires.each do |objQuestionaire| %>
<tr class="<%= cycle('odd', 'even') %>">
<td><%= objQuestionaire.Ques_id %></td>
<td><%= objQuestionaire.Qname %></td>
<td><%= objQuestionaire.Header %></td>
<td><%= objQuestionaire.Description %></td>
Rails.root: /home/cabox/workspace/app_1
Application Trace | Framework Trace | Full Trace
app/views/questionnaires/index.html.erb:20:in `block in _app_views_questionnaires_index_html_erb__3549852765576469128_70257686505360'
app/views/questionnaires/index.html.erb:17:in `_app_views_questionnaires_index_html_erb__3549852765576469128_70257686505360'
有没有办法实现这个目标?