Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation 805 #905

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed related testing directory issue (remove dir name on local machi…
…ne) : please provide conll data directory to the commented out "input_dir" parameter in code.
J007X committed Nov 18, 2022
commit ce8a1d2cffa663eba5b725a5713c6f3ff2a82ba0
33 changes: 16 additions & 17 deletions tests/forte/data/data_pack_profiling_test.py
Original file line number Diff line number Diff line change
@@ -354,10 +354,10 @@ def testPOSTaggingNER(self, input_path: str = ""): # input_output_pair ,
"""
Verify the intermediate representation of pipeline.
"""
input_path = (
"/Users/jamesxiao/Downloads/Semantic-Role-Labeling-master/conll-formatted-ontonotes-5.0/"
"data/conll-2012-test/data/english/annotations/bc/phoenix/00/"
)
# input_path = (
# "...path_to_conll ... /Semantic-Role-Labeling-master/conll-formatted-ontonotes-5.0/"
# "data/conll-2012-test/data/english/annotations/bc/phoenix/00/"
# )
if len(input_path) == 0:
self.nlp.set_reader(StringReader())
input_param = (
@@ -395,10 +395,10 @@ def testSimpleSerialization(self, input_path: str = ""):
"""
Verify the intermediate representation of pipeline.
"""
input_path = (
"/Users/jamesxiao/Downloads/Semantic-Role-Labeling-master/conll-formatted-ontonotes-5.0/"
"data/conll-2012-test/data/english/annotations/bc/phoenix/00/"
)
# input_path = (
# "... path_to_conll ... /Semantic-Role-Labeling-master/conll-formatted-ontonotes-5.0/"
# "data/conll-2012-test/data/english/annotations/bc/phoenix/00/"
# )
output_path = "./test_simple_pack_output/"

if len(input_path) == 0:
@@ -414,15 +414,14 @@ def testSimpleSerialization(self, input_path: str = ""):
else:
self.nlp.set_reader(OntonotesReader())
input_param = input_path

self.nlp.add(
PackNameJsonPackWriter(),
{
"output_dir": output_path,
"indent": 2,
"overwrite": True,
},
)
self.nlp.add(
PackNameJsonPackWriter(),
{
"output_dir": output_path,
"indent": 2,
"overwrite": True,
},
)

# self.nlp.add(NLTKSentenceSegmenter()) # SentenceAndTokenProcessor
# self.nlp.add(NLTKWordTokenizer())