# Error - strings.json

**URL:** <https://support.prodi.gy/t/error-strings-json/5403>\
**Category:** Uncategorized\
**Tags:** solved, usage, sense2vec\
**Created:** [March 2, 2022, 6:29pm UTC](https://support.prodi.gy/t/error-strings-json/5403 "2022-03-02T18:29:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![matt.whitby](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/matt.whitby/32/2837_2.png) [@matt.whitby](https://support.prodi.gy/u/matt.whitby)\
**Post date:** [March 2, 2022, 6:29pm UTC](https://support.prodi.gy/t/error-strings-json/5403/1 "2022-03-02T18:29:00Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/prodigy/original/2X/5/5f04a64eed216527171bd0d6d9de4b1f7c83c38f.jpeg)

python -m prodigy sense2vec.teach he\_people smalltext.txt --seeds "Kevin Cambridge,Charles Johns,Cloudesley Shovel,Roy Graham,Terry Hiron,Rex Cowan,Bob Rogers"

smalltext contents is:

Tearing Ledge is a rock pinnacle, south-east of the Bishop Rock lighthouse in the Western Rocks, Isles of Scilly. The wreck lies within some of the most spectacular submarine topography in the British Isles. Originally identified as the Romney, the wreck is now believed to be the Eagle. Both of these were lost in the same night on the 22nd October 1707 when Sir Cloudesley Shovell’s fleet, returning from the Mediterranean, foundered on the Western Rocks. The Eagle was a 70-gun third-rate, initially built at Portsmouth in 1679 and then rebuilt at Chatham in 1699. The Protected Wreck site (List entry 1000063) lies within the Isles of Scilly Special Area of Conservation and the Bishop to Crim Marine Conservation Zone, part of the Isles of Scilly Marine Conservation Zone. This Conservation Statement and Management Plan was produced to enable local and regional stakeholder involvement in our aspirations for the conservation management of the Tearing Ledge Protected Wreck site, so as to balance protection with economic and social needs. The principle aim of the Plan is to identify a shared vision of how the values and features of Tearing Ledge can be conserved, maintained and enhanced.

Fails with:

Traceback (most recent call last):  
File "C:\Users\Matt\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in \_run\_module\_as\_main  
return \_run\_code(code, main\_globals, None,  
File "C:\Users\Matt\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run\_code  
exec(code, run\_globals)  
File "C:\Users\Matt\AppData\Local\Programs\Python\Python39\lib\site-packages\prodigy\_main_.py", line 61, in   
controller = recipe(_args, use\_plac=True)  
File "cython\_src\prodigy\core.pyx", line 329, in prodigy.core.recipe.recipe\_decorator.recipe\_proxy  
File "C:\Users\Matt\AppData\Local\Programs\Python\Python39\lib\site-packages\plac\_core.py", line 367, in call  
cmd, result = parser.consume(arglist)  
File "C:\Users\Matt\AppData\Local\Programs\Python\Python39\lib\site-packages\plac\_core.py", line 232, in consume  
return cmd, self.func(_(args + varargs + extraopts), \*\*kwargs)  
File "C:\Users\Matt\AppData\Local\Programs\Python\Python39\lib\site-packages\sense2vec\prodigy\_recipes.py", line 54, in teach  
s2v = Sense2Vec().from\_disk(vectors\_path)  
File "C:\Users\Matt\AppData\Local\Programs\Python\Python39\lib\site-packages\sense2vec\sense2vec.py", line 342, in from\_disk  
self.vectors = Vectors().from\_disk(path)  
File "spacy\vectors.pyx", line 616, in spacy.vectors.Vectors.from\_disk  
File "C:\Users\Matt\AppData\Local\Programs\Python\Python39\lib\site-packages\spacy\util.py", line 1299, in from\_disk  
reader(path / key)  
File "spacy\vectors.pyx", line 609, in spacy.vectors.Vectors.from\_disk.lambda8  
File "spacy\strings.pyx", line 238, in spacy.strings.StringStore.from\_disk  
File "C:\Users\Matt\AppData\Local\Programs\Python\Python39\lib\site-packages\srsly\_json\_api.py", line 51, in read\_json  
file\_path = force\_path(path)  
File "C:\Users\Matt\AppData\Local\Programs\Python\Python39\lib\site-packages\srsly\util.py", line 24, in force\_path  
raise ValueError(f"Can't read file: {location}")  
ValueError: Can't read file: smalltext.txt\strings.json

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [March 2, 2022, 7:06pm UTC](https://support.prodi.gy/t/error-strings-json/5403/2 "2022-03-02T19:06:10Z")

</div>

Hi! The problem here is that the [`sense2vec.teach` recipe](https://github.com/explosion/sense2vec/#recipe-sense2vecteach) takes the **path to sense2vec vectors** as its first argument, not a text file. In the video, I'm using the medium Reddit vectors that you can download from the sense2vec repo.

The goal of this workflow is to use the vectors to suggest you similar words and phrases that you can accept or reject to build up a terminology list and patterns to semi-automate annotation in the next step. So there's not really any use for input text in this workflow – the suggestions all come from the vectors.

If you just want to annotate the text in your `.txt` file with a given list of labels, you can use a recipe like [`ner.manual`](https://prodi.gy/docs/recipes#ner-manual) instead, which I'm also showing in the next step of the video.

---

<div class="post-metadata">

**Author:** ![matt.whitby](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/matt.whitby/32/2837_2.png) [@matt.whitby](https://support.prodi.gy/u/matt.whitby)\
**Post date:** [March 2, 2022, 7:45pm UTC](https://support.prodi.gy/t/error-strings-json/5403/3 "2022-03-02T19:45:43Z")

</div>

Thanks. Ultimately I want to just create a model from scratch and use that (as my text will have so many domain specific terms). I have next week off work to dedicate this and just wanted to get a handle on the basics before Monday.

Ultimately, by the end of the week I just want a model that I can load into SpaCy to try and auto-annotate/tag a few hundred PDFs.

import spacy

import pandas as pd

df = pd.read\_pickle("c:\nhle\_desc.pck")

nlp = spacy.load("en\_core\_web\_sm")

subjectList ={}

for entity in doc.ents:  
subjectList.update({subjectEntry:entity.text})
