view · edit · sidebar · attach · print · history

20130524-debug-patinfo

<< | Index | >>


Summary

  • Debug Patinfo export

Commits

Index


Debug Patinfo

Old PIs(Document) don't have name.

z.B.

  • 40396
  • 61367

How many PI documents ?

# fr and de
ch.oddb> patinfos.values.select{|pi| next if pi.description("de").is_a?(String) or pi.description("fr").is_a?(String); pi.description("de").name.nil? or pi.description("fr").name.nil? }.length
-> 146

# only de
ch.oddb> patinfos.values.select{|pi| next if pi.description("de").is_a?(String); pi.description("de").name.nil? }.length
-> 95

get iksnr of these PIs.

ch.oddb> patinfos.values.select{|pi| next if pi.description("de").is_a?(String) or pi.description("fr").is_a?(String); pi.description("de").name.nil? or pi.description("fr").name.nil? }.map{|pi| pi.sequences.first.iksnr unless pi.sequences.empty? }.uniq.compact.length
-> 113

Attach:iksnrs-pi.txt

Problem PI title

Chapter title of some PI has name of PI... 
And in this case, Whitespace was the matter.

# title
"EchinaMed® "

# span
<p id="section2" class="s3">
<span class="s2">
<span>EchinaMed®</span>
</span>
</p>

# name in chapter
[1] 1.9.3-p194(#<ODDB::FiParse::PatinfoHpricot>)> name
=> {elem
 <p class="s3" id="section4">
 {elem
  <span class="s2">
  {elem <span> "Was sind EchinaMed Tabletten und wann" </span>}
  </span>}
 {elem <span class="s2"> {elem <span> " " </span>} </span>}
 {elem
  <span class="s2">
  {elem <span> "werden sie angewendet?" </span>}
  </span>}
 </p>}

How many PIs have wrong title

ch.oddb> patinfos.values.select{|pi| next if pi.description("de").is_a?(String) or pi.description("de").name.nil? or pi.description("fr").is_a?(String) or pi.description("fr").name.nil?; pi.description("de").name.match(/was|wann|wie|\?/i) or pi.description("fr").name.match(/was|wann|wie|\?/i) }.map{|pi| pi.sequences.first.iksnr unless pi.sequences.empty? }.uniq.compact.length
-> 76

Attach:wrong-chapter-name-pi.txt

commit
view · edit · sidebar · attach · print · history
Page last modified on May 24, 2013, at 09:33 AM