noahsantacruz commited on
Commit
0e591a5
1 Parent(s): e65a82d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +17 -1
README.md CHANGED
@@ -46,18 +46,34 @@ It detects the following types of entities:
46
 
47
  The [Sefaria-Project](https://github.com/Sefaria/Sefaria-Project) repo can use this model to return objects linked to objects in the Sefaria database. Non-citation entities are linked to `Topic` objects and citation entities are linked to `Ref` objects.
48
 
 
 
49
  ### Configuring Sefaria-Project to use this model
50
 
51
  The assumption is that Sefaria-Project is set up on your environment following the instructions in our [README](https://github.com/Sefaria/Sefaria-Project/blob/master/README.mkd).
52
 
 
 
53
  In `local_settings.py`, modify the following lines:
54
 
55
  ```python
 
 
56
  RAW_REF_MODEL_BY_LANG_FILEPATH = {
57
- "en": "/path/to/torah-ner-english model"
 
 
 
 
58
  }
59
  ```
60
 
 
 
 
 
 
 
61
  ### Running the model with Sefaria-Project
62
 
63
  The following code shows an example of instantiating the `Linker` object which uses the ML models and running the `Linker` with input.
 
46
 
47
  The [Sefaria-Project](https://github.com/Sefaria/Sefaria-Project) repo can use this model to return objects linked to objects in the Sefaria database. Non-citation entities are linked to `Topic` objects and citation entities are linked to `Ref` objects.
48
 
49
+ Note, this model is designed to be used in conjunction with the corresponding [subref model](https://huggingface.co/Sefaria/en_subref_ner). That model takes citations as input and tags the parts of the citation. The below instructions explain how to integrate both of these models into Sefaria-Project.
50
+
51
  ### Configuring Sefaria-Project to use this model
52
 
53
  The assumption is that Sefaria-Project is set up on your environment following the instructions in our [README](https://github.com/Sefaria/Sefaria-Project/blob/master/README.mkd).
54
 
55
+ Download this repo and the [subref repo](https://huggingface.co/Sefaria/en_subref_ner).
56
+
57
  In `local_settings.py`, modify the following lines:
58
 
59
  ```python
60
+ ENABLE_LINKER = True
61
+
62
  RAW_REF_MODEL_BY_LANG_FILEPATH = {
63
+ "en": "/path/to/en-ref-ner model"
64
+ }
65
+
66
+ RAW_REF_PART_MODEL_BY_LANG_FILEPATH = {
67
+ "en": "/path/to/en-subref-ner model",
68
  }
69
  ```
70
 
71
+ Make sure spaCy is installed.
72
+
73
+ ```bash
74
+ pip install spacy==3.4.1
75
+ ```
76
+
77
  ### Running the model with Sefaria-Project
78
 
79
  The following code shows an example of instantiating the `Linker` object which uses the ML models and running the `Linker` with input.