尝试实施此代码(https://github.com/kentonl/e2e-coref) 但是,在运行setup_all.sh时,出现错误的替换错误。
#!/bin/bash
# Download pretrained embeddings.
#curl -O http://downloads.cs.stanford.edu/nlp/data/glove.840B.300d.zip
#unzip glove.840B.300d.zip
#rm glove.840B.300d.zip
# Build custom kernels.
TF_CFLAGS=$(python -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_compile_flags()))')
TF_LFLAGS=$(python -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_link_flags()))')
echo $TF_CFLAGS
echo $TF_LFLAGS
# Linux (pip)
g++ -std=c++11 -shared coref_kernels.cc -o coref_kernels.so -fPIC ${TF_CFLAGS[@]} ${TF_LFLAGS[@]} -O2 -D_GLIBCXX_USE_CXX11_ABI=0
# Linux (build from source)
#g++ -std=c++11 -shared coref_kernels.cc -o coref_kernels.so -fPIC ${TF_CFLAGS[@]} ${TF_LFLAGS[@]} -O2
# Mac
#g++ -std=c++11 -shared coref_kernels.cc -o coref_kernels.so -I -fPIC ${TF_CFLAGS[@]} ${TF_LFLAGS[@]} -O2 -D_GLIBCXX_USE_CXX11_ABI=0 -undefined dynamic_lookup
在第15行中出现错误的替换错误。 任何帮助,将不胜感激:)