sander-wood commited on
Commit
feb3cdd
1 Parent(s): 391ba08

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +20 -16
README.md CHANGED
@@ -16,25 +16,29 @@ tags:
16
 
17
  In [CLaMP: Contrastive Language-Music Pre-training for Cross-Modal Symbolic Music Information Retrieval](https://ai-muzic.github.io/clamp/), we introduce WikiMusicText (WikiMT), a new dataset for the evaluation of semantic search and music classification. It includes 1010 lead sheets in ABC notation sourced from Wikifonia.org, each accompanied by a title, artist, genre, and description. The title and artist information is extracted from the score, whereas the genre labels are obtained by matching keywords from the Wikipedia entries and assigned to one of the 8 classes (Jazz, Country, Folk, R&B, Pop, Rock, Dance, and Latin) that loosely mimic the GTZAN genres. The description is obtained by utilizing BART-large to summarize and clean the corresponding Wikipedia entry. Additionally, the natural language information within the ABC notation is removed.
18
 
19
- WikiMT is a unique resource to support the evaluation of semantic search and music classification. However, it is important to acknowledge that the dataset was curated from publicly available sources, and there may be limitations concerning the accuracy and completeness of the genre and description information. Further research is needed to explore the potential biases and limitations of the dataset and to develop strategies to address them. Therefore, to support additional investigations, we also provide the [source files](https://github.com/microsoft/muzic/blob/main/clamp/wikimusictext/source_files.zip) of WikiMT, including the MusicXML files from Wikifonia and the original entries from Wikipedia.
20
 
21
- ## Obtaining ABC Notation Music Scores
22
 
23
- To access ABC notation music scores from the WikiMT dataset, you will need to follow these steps:
24
 
25
- 1. **Find the Wikifonia Data Link:** The code provided does not offer a direct link to download Wikifonia.zip. To obtain the Wikifonia dataset, you must first locate a download link for the ABC notation data. You can search for it on the internet or on Wikifonia-related websites.
26
 
27
- 2. **Run the Provided Code:** After finding the download link for the Wikifonia ABC notation data, you can execute the provided Python code. The code will prompt you to input the URL from which to fetch the ABC notation data.
28
 
29
- For example, you will be prompted to enter the URL as follows:
30
-
31
- ```python
32
- Enter the Wikifonia URL: [Paste your URL here]
33
- ```
34
 
35
- Paste the URL to the Wikifonia.zip file and press Enter. The code will then proceed to download, process, and extract the musical content, making it accessible for your research or applications.
36
 
37
- By following these steps, you can successfully obtain ABC notation music scores from the WikiMT dataset after providing the necessary download link.
 
 
 
 
 
 
 
 
38
 
39
  ```python
40
  import subprocess
@@ -81,7 +85,7 @@ def filter(lines):
81
  def load_music(filename):
82
  # Convert the file to ABC notation
83
  p = subprocess.Popen(
84
- f'cmd /u /c python xml2abc_145/xml2abc.py -m 2 -c 6 -x "{filename}"',
85
  stdout=subprocess.PIPE,
86
  stderr=subprocess.PIPE,
87
  shell=True
@@ -120,9 +124,6 @@ def download_and_extract(url):
120
  else:
121
  print("Failed to download the file. HTTP response code:", response.status_code)
122
 
123
- # Special thanks to Wim Vree for xml2abc.py
124
- download_and_extract("https://wim.vree.org/svgParse/xml2abc.py-145.zip")
125
-
126
  # Download the Wikifonia dataset
127
  wikifonia_url = input("Enter the Wikifonia URL: ")
128
  download_and_extract(wikifonia_url)
@@ -145,6 +146,9 @@ with open("wikimusictext.jsonl", "w", encoding="utf-8") as f:
145
  f.write(json.dumps(song, ensure_ascii=False)+"\n")
146
  ```
147
 
 
 
 
148
  ## Copyright Disclaimer
149
  WikiMT was curated from publicly available sources, and all rights to the original content and data remain with their respective copyright holders. The dataset is made available for research and educational purposes, and any use, distribution, or modification of the dataset should comply with the terms and conditions set forth by the original data providers.
150
 
 
16
 
17
  In [CLaMP: Contrastive Language-Music Pre-training for Cross-Modal Symbolic Music Information Retrieval](https://ai-muzic.github.io/clamp/), we introduce WikiMusicText (WikiMT), a new dataset for the evaluation of semantic search and music classification. It includes 1010 lead sheets in ABC notation sourced from Wikifonia.org, each accompanied by a title, artist, genre, and description. The title and artist information is extracted from the score, whereas the genre labels are obtained by matching keywords from the Wikipedia entries and assigned to one of the 8 classes (Jazz, Country, Folk, R&B, Pop, Rock, Dance, and Latin) that loosely mimic the GTZAN genres. The description is obtained by utilizing BART-large to summarize and clean the corresponding Wikipedia entry. Additionally, the natural language information within the ABC notation is removed.
18
 
19
+ WikiMT is a unique resource to support the evaluation of semantic search and music classification. However, it is important to acknowledge that the dataset was curated from publicly available sources, and there may be limitations concerning the accuracy and completeness of the genre and description information. Further research is needed to explore the potential biases and limitations of the dataset and to develop strategies to address them.
20
 
21
+ Certainly, let's maintain a more concise and to-the-point style in GitHub readme fashion:
22
 
23
+ Apologies for the oversight. Here's the revised section that includes the "provided code":
24
 
25
+ ## How to Obtain ABC Notation Music Scores
26
 
27
+ To access ABC notation music scores from the WikiMT dataset, follow these steps:
28
 
29
+ 1. **Download WikiMT Metadata:** Get the metadata file for WikiMT [here](https://huggingface.co/datasets/sander-wood/wikimusictext/resolve/main/wikimusictext.jsonl). This file has important dataset information.
 
 
 
 
30
 
31
+ 2. **Get the `xml2abc.py` Script:** Download the `xml2abc.py` script from [this link](https://wim.vree.org/svgParse/xml2abc.html) and save it in your local directory.
32
 
33
+ 3. **Find Wikifonia MusicXML Data Link:** Locate a download link for the Wikifonia dataset in MusicXML format (with .mxl extension). You can search the internet or Wikifonia-related websites for it.
34
+
35
+ 4. **Run the Provided Code:** After acquiring the WikiMT metadata, the `xml2abc.py` script, and the Wikifonia MusicXML data link, execute the provided Python code below. It'll prompt you for the Wikifonia data URL, like this:
36
+
37
+ ```python
38
+ Enter the Wikifonia URL: [Paste your URL here]
39
+ ```
40
+
41
+ Paste your URL pointing to the Wikifonia.zip file and press Enter. The code will take care of downloading, processing, and extracting the music content, making it ready for your research or applications.
42
 
43
  ```python
44
  import subprocess
 
85
  def load_music(filename):
86
  # Convert the file to ABC notation
87
  p = subprocess.Popen(
88
+ f'cmd /u /c python xml2abc.py -m 2 -c 6 -x "{filename}"',
89
  stdout=subprocess.PIPE,
90
  stderr=subprocess.PIPE,
91
  shell=True
 
124
  else:
125
  print("Failed to download the file. HTTP response code:", response.status_code)
126
 
 
 
 
127
  # Download the Wikifonia dataset
128
  wikifonia_url = input("Enter the Wikifonia URL: ")
129
  download_and_extract(wikifonia_url)
 
146
  f.write(json.dumps(song, ensure_ascii=False)+"\n")
147
  ```
148
 
149
+ By following these steps and running the provided code, you can efficiently access ABC notation music scores from the WikiMT dataset. Just ensure you have the metadata, the `xml2abc.py` script, and the correct download link before starting. Enjoy your musical journey!
150
+
151
+
152
  ## Copyright Disclaimer
153
  WikiMT was curated from publicly available sources, and all rights to the original content and data remain with their respective copyright holders. The dataset is made available for research and educational purposes, and any use, distribution, or modification of the dataset should comply with the terms and conditions set forth by the original data providers.
154