Skip to content

Commit

Permalink
encoding and template fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
Patent2net committed Jan 14, 2021
1 parent 1e34e49 commit d4dd53f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
File renamed without changes.
10 changes: 5 additions & 5 deletions Patent2Net/ClusterPreProcess.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@
CibName = 'en-'+ bre['label']+"Desc.txt"
if FicName in lstfic:
try:
toto = bre['title'].encode('ascii')
toto = bre['title']
with codecs.open(ResultContentsPath +'//CibDesc//'+CibName, 'r', encoding='utf8', errors="ignore") as fic:
tempo = fic.readlines()
IPCRsTexte= ' '.join([lig for lig in tempo if "***" not in lig])
IPCRsTexte.encode('ascii')
#IPCRsTexte.encode('ascii')

# with codecs.open(ResultPathContentAug+'//'+FicName, 'r', encoding='ascii', errors="ignore") as fic:
# tempo = fic.readlines()
Expand All @@ -140,17 +140,17 @@
with codecs.open(ResultContentsPath +'//Abstract//'+AbsName, 'r', encoding='utf8', errors="ignore") as fic:
tempo = fic.readlines()
PureAbstract= '\n'.join([lig for lig in tempo if "***" not in lig])
PureAbstract.encode('ascii')
#PureAbstract.encode('ascii')

with codecs.open(ResultPathContentAug+'//'+FicName, 'w', encoding='utf8', errors="ignore") as fic:
tempo = fic.write(IPCRsTexte+' \n'+ toto.decode().lower()+' \n'+ PureAbstract +' \n')
Abstracts.append(PureAbstract)
IPCRsText.append(IPCRsTexte)
Contents.append(IPCRsTexte+' \n'+ toto.decode().lower()+' \n'+ PureAbstract +' \n')
#should explode on chinese titles
Titles.append(toto.decode().lower())
Titles.append(toto.lower())
Labels.append(bre['label'])
Tit2FicName[toto.decode().lower()] = FicName
Tit2FicName[toto.lower()] = FicName # .decode()
except:
pass # no file OR bad coding

Expand Down
6 changes: 3 additions & 3 deletions Patent2Net/templates/ModeleContenuIndex.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</nav>
</header>
<div class="caption dark animated wow fadeInDown clearfix">
<h1><a href="http://patent2netv2.vlab4u.info/dokuwiki/doku.php?id=page" title="Patent2Net documentation" target="_blank">A patent collector and analyser</a> to expand <br/> your horizon with various data processing tools<br/> for education and scientific purposes</h1>
<h1><a href="https://p2n-v3.readthedocs.io/en/latest/" title="Patent2Net documentation" target="_blank">A patent collector and analyser</a> to expand <br/> your horizon with various data processing tools<br/> for education and scientific purposes</h1>
<p>using EPO's database of over <a href="http://worldwide.espacenet.com/"> 110 000 000 patents </a></p>

<hr>
Expand Down Expand Up @@ -143,11 +143,11 @@ <h2>Patents</h2>
{% endif %}
{% if FusionCarrot2 %}
<li>
<a href="#" onclick="{{wo('*CollectName*Carrot.html')}} return false;"> P2N Clusterer</a>
<a href="#" onclick="{{wo('*CollectName*Carrot.html')}} return false;">Carrot ES Plugin</a>

</li>
{% endif %}
DATA/IA/IACarrot.html

</ul>
{% if HasFamily %}
<h2>Families</h2>
Expand Down
8 changes: 4 additions & 4 deletions Patent2Net/templates/ModeleIndex.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@

</header>
<div class="caption dark animated wow fadeInDown clearfix">
<h1><a href="http://patent2netv2.vlab4u.info/dokuwiki/doku.php?id=page" title="Patent2Net documentation" target="_blank">A crawler</a> to expand your horizon <br/>with various data processing tools<br/> for education and scientific purposes</h1>
<p>using EPO's database of over <a href="http://worldwide.espacenet.com/"> 110 000 000 patents </a></p>
<h1><a href="https://p2n-v3.readthedocs.io/en/latest/" title="Patent2Net documentation" target="_blank">A crawler</a> to expand your horizon <br/>with various data processing tools<br/> for education and scientific purposes</h1>
<p>using EPO's database of over <a href="http://worldwide.espacenet.com/"> 120 000 000 patents </a></p>
</div>
<div class="shadow"></div>
</section><!-- End billboard -->

Click on tags to open the analysis of the associated patent universe.
<br/> Use <a href="http://patent2netv2.vlab4u.info/dokuwiki/doku.php?id=page" target="_blank">P2N</a> to build your own cases!
<br/> Use <a href="https://github.com/Patent2net/P2N-v3" target="_blank">P2N</a> to build your own cases!
<div id="myCanvasContainer">
<canvas width="1200" height="400" id="myCanvas">
<p>The use of firefox is mandatory.</p>
Expand All @@ -77,7 +77,7 @@ <h1><a href="http://patent2netv2.vlab4u.info/dokuwiki/doku.php?id=page" title="P
var ladate=new Date()
document.write(ladate.getFullYear())

</script> . Open source licence "as is". See <a href="http://patent2netv2.vlab4u.info/dokuwiki/doku.php?id=about_p2n:disclaimer" target="_blank">disclaimer</a></p>
</script> . Open source licence "as is". See <a href="https://cecill.info/licences/Licence_CeCILL-B_V1-en.html" target="_blank">disclaimer</a></p>

</div>

Expand Down

0 comments on commit d4dd53f

Please sign in to comment.