Skip to content

Issue using textcomplexity #1

Description

@li-xuyang28

Hi,

Thank you for developing such a comprehensive resource for complexity computation. I am trying the package but ran into some errors,

Traceback (most recent call last):
  File "/usr/local/bin/txtcomplexity", line 12, in <module>
    textcomplexity.cli.main()
  File "/usr/local/lib/python3.7/dist-packages/textcomplexity/cli.py", line 147, in main
    results.extend(surface_based(tokens, args.window_size, args.all_measures))
  File "/usr/local/lib/python3.7/dist-packages/textcomplexity/cli.py", line 60, in surface_based
    mean, stdev, _ = surface.bootstrap(measure, tokens, window_size, strategy="spread")
  File "/usr/local/lib/python3.7/dist-packages/textcomplexity/surface.py", line 478, in bootstrap
    for window in windows.disjoint_windows(tokens, window_size, strategy):
  File "/usr/local/lib/python3.7/dist-packages/textcomplexity/utils/windows.py", line 30, in disjoint_windows
    assert window_size <= text_length
AssertionError

I used run_stanza.py to prepare the conllu file. Could you please suggest what might I do wrong?

Best

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions