Questions tagged [stanza]

L.B.Stanza is a new programming language designed to significantly increase the productivity of application programmers. Its primary goal is to help programmers tackle the complexity of architecting large programs.

L.B.Stanza (or Stanza for short) is a new programming language designed to significantly increase the productivity of application programmers. Its primary goal is to help programmers tackle the complexity of architecting large programs.

More info: http://lbstanza.org/

60 questions
0
votes
0 answers

Get dependencies NLP stanza?

I would like to understand how to get a specific syntax for universal dependencies (POS-based), as they are the input for a code I'm trying to reproduce. More specifically, I have this sentence Workvivo received financial backing in its latest…
0
votes
0 answers

How to get original token position in string from Stanza constituency parse tree?

I am using Stanza to extract noun phrases from texts. I am using this code to extract the NPs and store them according to their depth. nlp = stanza.Pipeline('en', tokenize_pretokenized=True) sentence_tokens = ['This', 'is', 'a', 'sentence', '.'] doc…
kachap
  • 1
0
votes
0 answers

stanza: add double linebreaks in list of articles (batching to speed up stanza nlp pipeline)

I have a list of articles and want to apply stanza nlp to them, but running the code (in Google Colab), stanza never finishes. Online (https://github.com/stanfordnlp/stanza) I found that separating the documents (in my case, articles in a list) with…
Linda Brck
  • 71
  • 6
0
votes
0 answers

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443):

I got this error while running below code, please helps! stanza.Pipeline(lang='id', processors='tokenize', use_gpu=True) full error: requests.exceptions.ConnectionError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries…
StudyOnly
  • 25
  • 2
0
votes
2 answers

awk: end of line vs end of record

I am trying to match number at the end of the line ($), print relevant paragraphs and ignore third paragraph. Here is data: this is first paragraph number 200 with some text this is second paragraph with some text number 200 this is third…
0
votes
0 answers

The "stanza" event is not fired. But messege is sending

Below is code for react: import React, {useEffect} from 'react' import { BoshClient } from "xmpp-bosh-client/browser"; const dummyMessages = [ { id: 'abcdef', isSender: true, message: 'Heelo' }, { id: 'bcdef', isSender: false, message:…
0
votes
1 answer

How to remove stopwords from a txt where the user specifies the language using Stanza

I have many .txt files like this: But they are on a few different languages so the user specifies it this way: lng = input("In what language is the text typed? ('ca' for catalan, 'es' for spanish, 'en' for english...)\n") I would like to delete…
0
votes
2 answers

What is the best way to embed binary value in String

I would like to use escape to represent control code to build a message with terminal color. Can I use something like... "\u001b[93m" or "\x1b[93m" ?
S2000Erwin
  • 11
  • 1
0
votes
2 answers

How to represent NULL pointer in lostanza when interfaces with C?

This code works perfectly (ignore the color information part for now) lostanza deftype SDL_Rect : x: int y: int w: int h: int lostanza defn SDL_Rect (x:ref, y:ref, w:ref, h:ref) -> ref : return new…
S2000Erwin
  • 11
  • 1
0
votes
1 answer

How to define an alias type?

A route is defined as a [String, String] tuple. What is the most appropriate way to define type alias 'Route' as [String, String]? e.g. defn same-route? ( x : [String,String], y : [String,String] ) -> True|False : I would like to use defn…
S2000Erwin
  • 11
  • 1
0
votes
2 answers

What is the best way to define and initialize a Table?

In Python, we can do this. board = {'us': {'name': 'USA', 'govern': 'good'}, 'canada': {'name': 'Canada', 'govern': 'good'}, 'uk': {'name': 'UK', 'govern': 'good', 'recruit': 3}, 'spain': {'name': 'Spain', 'govern':…
S2000Erwin
  • 11
  • 1
0
votes
0 answers

Dependency Parsing NLP

I'm using stanza/spacy nlp for finding the dependency parsing between words. For example doc=nlp("His home was in violation of local and state zoning and environmental regulations, and there was no access to a road"). keyword={""changes"": [""no…
0
votes
1 answer

Why does Presidio StanzaNlpEngine throw NameError: name 'StanzaLanguage' is not defined?

I'm trying to use Stanza language models with Presidio and running into this blocker. import stanza stanza.download("en") from presidio_analyzer.nlp_engine import StanzaNlpEngine StanzaNlpEngine(models={"en": "en"}) Above throws... Traceback (most…
conner.xyz
  • 6,273
  • 8
  • 39
  • 65
0
votes
2 answers

How do I find and replace characters in a string in stanza?

Let's say I have a string val s = "_1.2V_ADC" The period is invalid for my use case so I need to replace it with another character, like p so the final string should be "_1p2V_ADC" Is there any easy way to do that in Stanza?
0
votes
1 answer

How do I check if a string is a valid integer?

Let's say I have val s = "123" val r = "a123h" How do I check if s can be resolved to a valid integer?