-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved the makefile a bit for fetching OpenNLP dependencies. Update…
…d the setup guide accordingly. Improved output from dependency checker.
- Loading branch information
Mark Granroth-Wilding
committed
Mar 18, 2016
1 parent
67bd78e
commit 7a0880f
Showing
7 changed files
with
36 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from tabulate import tabulate | ||
from textwrap import wrap | ||
|
||
def multiline_tablate(table, widths, **kwargs): | ||
# Wrap columns | ||
table = [[wrap(cell, width=width) for (cell, width) in zip(row, widths)] for row in table] | ||
table_split = [] | ||
for row in table: | ||
subrows = max(len(cell) for cell in row) | ||
new_row = [cell + [""] * (subrows - len(cell)) for cell in row] | ||
table_split.extend(zip(*new_row)) | ||
# Add a blank line | ||
table_split.append([""] * len(table_split[0])) | ||
return tabulate(table_split[:-1], **kwargs) |