|
232 | 232 | "source": [ |
233 | 233 | "skillset_name = f'{datasource_container}-ss'\n", |
234 | 234 | "skillset_def = {\n", |
235 | | - " '@odata.etag': '\\'0x8D7F6C769AC06B2\\'',\n", |
236 | 235 | " 'name': f'{skillset_name}',\n", |
237 | 236 | " 'description': 'Skillset to enrich hotel reviews with aspect based sentiment',\n", |
238 | 237 | " 'skills': [\n", |
|
1496 | 1495 | "metadata": {}, |
1497 | 1496 | "outputs": [], |
1498 | 1497 | "source": [ |
1499 | | - "docs = [ \"Great\", \"The bathroom sink splashes water, need to be fixed. The bathtub/shower make loud noises. Other than that, it was a good stay.\" ]\n", |
| 1498 | + "%pip install git+https://github.com/NervanaSystems/nlp-architect.git@absa --user" |
| 1499 | + ] |
| 1500 | + }, |
| 1501 | + { |
| 1502 | + "cell_type": "code", |
| 1503 | + "execution_count": null, |
| 1504 | + "metadata": {}, |
| 1505 | + "outputs": [], |
| 1506 | + "source": [ |
| 1507 | + "from nlp_architect.models.absa.inference.inference import SentimentInference\n", |
| 1508 | + "\n", |
| 1509 | + "aspect_lex_path = \"../models/hotel_aspect_lex.csv\"\n", |
| 1510 | + "opinion_lex_path = \"../models/hotel_opinion_lex_reranked.csv\"\n", |
| 1511 | + "inference = SentimentInference(aspect_lex_path, opinion_lex_path)\n", |
1500 | 1512 | "\n", |
| 1513 | + "docs = [ \"Great\", \"The bathroom sink splashes water, need to be fixed. The bathtub/shower make loud noises. Other than that, it was a good stay.\" ]\n", |
1501 | 1514 | "sentiment_docs = []\n", |
1502 | 1515 | "\n", |
1503 | 1516 | "for doc_raw in docs:\n", |
|
1795 | 1808 | "outputs": [], |
1796 | 1809 | "source": [ |
1797 | 1810 | "skillset_def = {\n", |
1798 | | - " '@odata.etag': '\\'0x8D7F6C769AC06B2\\'',\n", |
1799 | 1811 | " 'name': f'{skillset_name}',\n", |
1800 | 1812 | " 'description': 'Skillset to enrich hotel reviews with aspect based sentiment',\n", |
1801 | 1813 | " 'skills': [\n", |
|
0 commit comments