Skip to content
Snippets Groups Projects
Select Git revision
  • 48db560f0982637de0b9a1d23202d8a34cbb4b09
  • master default protected
  • vertical_relations
  • lu_without_semantic_frames
  • hierarchy
  • additional-unification-filters
  • v0.1.1
  • v0.1.0
  • v0.0.9
  • v0.0.8
  • v0.0.7
  • v0.0.6
  • v0.0.5
  • v0.0.4
  • v0.0.3
  • v0.0.2
  • v0.0.1
17 results

SelectionalPreference.js

Blame
  • sample_conll.py 723 B
    """A message of shame -- documentation must be completed."""
    
    import poldeepner2.models
    
    ner = poldeepner2.models.load("conll-english-large-sq", device="cuda:0",
                                  resources_path="/tmp")
    
    sentences = ["""(CNN)In a new criminal court case against a woman alleged to
    have entered the US Capitol on January 6, the FBI noted that a tipster
    raised the possibility of a laptop being stolen from House Speaker Nancy
    Pelosi's office to potentially sell to Russia."""]
    
    for sentence in sentences:
        print("-" * 20)
        print(sentence)
        for name in ner.process_text(sentence):
            name_range = "%d:%d" % (name.start, name.end)
            print("%-8s %-20s %s" % (name_range, name.label, name.text))