我正在阅读有关信息检索的信息,并且试图使用Java复制搜索引擎。我创建了一个基本的字典和一个非常基本的CSV文件阅读器。我想按字母顺序对术语进行排序。
这是我的Building package openssl-windows[core]:x64-windows...
-- Downloading http://strawberryperl.com/download/5.24.1.1/strawberry-perl-
5.24.1.1-32bit-portable.zip...
-- Downloading http://strawberryperl.com/download/5.24.1.1/strawberry-perl-
5.24.1.1-32bit-portable.zip... Failed. Status: 22;"HTTP response code said
error"
CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:156 (message):
Failed to download file.
If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment
variables to "https://user:password@your-proxy-ip-address:port/".
Otherwise, please submit an issue at
https://github.com/Microsoft/vcpkg/issues
Call Stack (most recent call first):
scripts/cmake/vcpkg_find_acquire_program.cmake:237
(vcpkg_download_distfile)
ports/openssl-windows/portfile.cmake:9 (vcpkg_find_acquire_program)
scripts/ports.cmake:71 (include)
Error: Building package openssl-windows:x64-windows failed with:
BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`,
then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: openssl-windows:x64-windows
Vcpkg version: 2018.10.20-nohash
代码:
dictionary
它工作正常。首先,我尝试将public class Dicionario {
private final Map<String, Integer> dictionary = new HashMap<>();
public void makeDictionary(String folderToRead, String[] filesToRead, String regex) {
final Parser parser = new Parser(regex);
for (String files : filesToRead) {
CSVFile.abrirArquivoDeLeitura(folderToRead, files);
for (String x : parser.split(CSVFile.readTexto())) {
String aux = x.trim().toUpperCase();
if (!dictionary.containsKey(aux))
dictionary.put(aux, contador++);
}
}
}
}
转换为x
,对其进行排序,然后将其转换回String。没有布宜诺斯艾利斯。我还尝试使用charArray
和TreeMap
对术语进行排序,但它更改了CSVFile的结果,而全都错了。
对我有什么提示吗?