SupWSD Pocket Edition

The SupWSD Pocket is a light version of SupWSD which allows you to perform the disambiguation process in offline mode, without the need to configure the toolkit pipeline. The pocket edition uses the best-known configuration and displays the results in JSON format.

The SupWSD Pocket requires JRE 1.8 or above. The zip file is available from the download page.

Installation

To work with the SupWSD pocket, unpack the zip file with:

Copied to clipboard
unzip supwsd-pocket.zip

Now, download the pocket language models and move the zip files to the installation folder. You mustn't unpack the model archives!

Running

To analyze a sentence, navigate to the installation folder using your shell and type:

Copied to clipboard
java -jar supwsd-pocket.jar sentence language model
sentence the sentence to be analyzed.
language the language of the sentence: EN, FR, DE, IT, ES.
model the model to be used in the disambiguation process: SEMCOR (English only), SEMCOR_OMSTI (English only), TRAIN_O_MATIC.
If you don't specify the model, the program will load the default one: semcor_omsti for English, train_o_matic for other languages.

SupWSD pocket will print the disambiguation results including the probability distribution over senses for all the words in the sentence.

>java -jar supwsd-pocket.jar 'The human brain is quite proficient at word-sense disambiguation.' en semcor_omsti
[
  {
    "token": {
      "word": "The",
      "tag": "DT",
      "pos": "NOUN",
      "lemma": "the"
    },
    "senses": [
      {
        "id": "U",
        "probability": 1.0
      }
    ]
  },
  {
    "token": {
      "word": "human",
      "tag": "JJ",
      "pos": "ADJ",
      "lemma": "human"
    },
    "senses": [
      {
        "id": "human%3:01:00::",
        "probability": 0.5186562830274255
      },
      {
        "id": "human%3:00:00::",
        "probability": 0.24960670716780253
      },
      {
        "id": "human%3:01:01::",
        "probability": 0.2317370098047719
      }
    ]
  },
  {
    "token": {
      "word": "brain",
      "tag": "NN",
      "pos": "NOUN",
      "lemma": "brain"
    },
    "senses": [
      {
        "id": "brain%1:08:00::",
        "probability": 0.41164696630447617
      },
      {
        "id": "brain%1:18:00::",
        "probability": 0.21535601314321137
      },
      {
        "id": "brain%1:09:00::",
        "probability": 0.18750595505954415
      },
      {
        "id": "brain%1:09:01::",
        "probability": 0.18549106549276823
      }
    ]
  },
  {
    "token": {
      "word": "is",
      "tag": "VBZ",
      "pos": "VERB",
      "lemma": "be"
    },
    "senses": [
      {
        "id": "be%2:42:03::",
        "probability": 0.22342081210545192
      },
      {
        "id": "be%2:42:06::",
        "probability": 0.08343524647397425
      },
      {
        "id": "be%2:42:09::",
        "probability": 0.0780860178423599
      },
      {
        "id": "be%2:42:05::",
        "probability": 0.07767209551986816
      },
      {
        "id": "be%2:42:01::",
        "probability": 0.07405223148248687
      },
      {
        "id": "be%2:42:02::",
        "probability": 0.07318010761333324
      },
      {
        "id": "be%2:40:00::",
        "probability": 0.07225047965136297
      },
      {
        "id": "be%2:42:08::",
        "probability": 0.06909834491603184
      },
      {
        "id": "be%2:42:00::",
        "probability": 0.06742651514056155
      },
      {
        "id": "be%2:41:00::",
        "probability": 0.06528517138653986
      },
      {
        "id": "be%2:42:04::",
        "probability": 0.05894378337741274
      },
      {
        "id": "be%2:42:07::",
        "probability": 0.057149194490616624
      }
    ]
  },
  {
    "token": {
      "word": "quite",
      "tag": "RB",
      "pos": "ADV",
      "lemma": "quite"
    },
    "senses": [
      {
        "id": "quite%4:02:02::",
        "probability": 0.4294685929011319
      },
      {
        "id": "quite%4:02:01::",
        "probability": 0.35128873648957576
      },
      {
        "id": "quite%4:02:03::",
        "probability": 0.2192426706092924
      }
    ]
  },
  {
    "token": {
      "word": "proficient",
      "tag": "JJ",
      "pos": "ADJ",
      "lemma": "proficient"
    },
    "senses": [
      {
        "id": "proficient%5:00:00:skilled:00",
        "probability": 1.0
      }
    ]
  },
  {
    "token": {
      "word": "at",
      "tag": "IN",
      "pos": "ADV",
      "lemma": "at"
    },
    "senses": [
      {
        "id": "U",
        "probability": 1.0
      }
    ]
  },
  {
    "token": {
      "word": "word-sense",
      "tag": "NN",
      "pos": "NOUN",
      "lemma": "word-sense"
    },
    "senses": [
      {
        "id": "U",
        "probability": 1.0
      }
    ]
  },
  {
    "token": {
      "word": "disambiguation",
      "tag": "NN",
      "pos": "NOUN",
      "lemma": "disambiguation"
    },
    "senses": [
      {
        "id": "U",
        "probability": 1.0
      }
    ]
  },
  {
    "token": {
      "word": ".",
      "tag": ".",
      "pos": "NOUN",
      "lemma": "."
    },
    "senses": [
      {
        "id": "U",
        "probability": 1.0
      }
    ]
  }
]