Download tasks/bibliometric_lab/solution/reference/text_features.py from Tokenwave-AI/REE: direct link, hf CLI and curl.
- Browser
- Download file 320 Bytes
-
https://huggingface.co/datasets/Tokenwave-AI/REE/resolve/main/tasks/bibliometric_lab/solution/reference/text_features.py
- Command line
-
hf download hf://datasets/Tokenwave-AI/REE/tasks/bibliometric_lab/solution/reference/text_features.py
-
curl -L -o text_features.py https://huggingface.co/datasets/Tokenwave-AI/REE/resolve/main/tasks/bibliometric_lab/solution/reference/text_features.py
320 Bytes
| """Task input adaptation for the standard TF-IDF text-regression fallback.""" | |
| def paper_text(document): | |
| """Keep SciRepEval's title and abstract fields; whitespace separates fields.""" | |
| return "\n".join(str(document[field]) for field in ("title", "abstract") | |
| if document.get(field)).strip() | |